Skip to content

perf(transformer/styled-components): reduce string comparisons#12191

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-10-perf_transformer_styled-components_reduce_string_comparisons
Jul 10, 2025
Merged

perf(transformer/styled-components): reduce string comparisons#12191
graphite-app[bot] merged 1 commit intomainfrom
07-10-perf_transformer_styled-components_reduce_string_comparisons

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 10, 2025

Small optimization. is_pure_helper previously checked if name != 'injectGlobal' and then name == 'injectGlobal' in StyledComponentsHelper::from_str. Skip these unnecessary comparisons.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance labels Jul 10, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review July 10, 2025 13:27
@overlookmotel overlookmotel requested a review from Dunqing as a code owner July 10, 2025 13:27
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12191 will not alter performance

Comparing 07-10-perf_transformer_styled-components_reduce_string_comparisons (4118b96) with main (94796a0)

Summary

✅ 34 untouched benchmarks

@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Jul 10, 2025
Copy link
Member

Dunqing commented Jul 10, 2025

Merge activity

Small optimization. `is_pure_helper` previously checked if `name != 'injectGlobal'` and then `name == 'injectGlobal'` in `StyledComponentsHelper::from_str`. Skip these unnecessary comparisons.
@graphite-app graphite-app bot force-pushed the 07-10-perf_transformer_styled-components_reduce_string_comparisons branch from e276b5b to 4118b96 Compare July 10, 2025 14:23
@graphite-app graphite-app bot merged commit 4118b96 into main Jul 10, 2025
24 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 10, 2025
@graphite-app graphite-app bot deleted the 07-10-perf_transformer_styled-components_reduce_string_comparisons branch July 10, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants