Skip to content

perf(transformer/styled-components): pass Atom instead of Option<Atom>#12218

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

perf(transformer/styled-components): pass Atom instead of Option<Atom>#12218
graphite-app[bot] merged 1 commit intomainfrom
07-11-perf_transformer_styled-components_pass_atom_instead_of_option_atom_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jul 11, 2025

Small optimization. There's only one path leading to create_object_property where value can be None.

Move value.unwrap_or(Atom::from("")) from create_object_property to the one place where None was previously created. This avoids creating an Option::Some on all the other paths, only to unwrap it again later. This removes a branch from create_object_property.

Copy link
Member Author

overlookmotel commented Jul 11, 2025


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.

@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 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 11, 2025

CodSpeed Instrumentation Performance Report

Merging #12218 will not alter performance

Comparing 07-11-perf_transformer_styled-components_pass_atom_instead_of_option_atom_ (242e721) with 07-11-refactor_transformer_styled-components_use_atom_everywhere (836bf9d)

Summary

✅ 34 untouched benchmarks

@overlookmotel overlookmotel marked this pull request as ready for review July 11, 2025 11:33
@overlookmotel overlookmotel requested a review from Dunqing as a code owner July 11, 2025 11:33
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Copy link
Member

Dunqing commented Jul 11, 2025

Merge activity

…tom>` (#12218)

Small optimization. There's only one path leading to `create_object_property` where `value` can be `None`.

Move `value.unwrap_or(Atom::from(""))` from `create_object_property` to the one place where `None` was previously created. This avoids creating an `Option::Some` on all the other paths, only to unwrap it again later. This removes a branch from `create_object_property`.
@graphite-app graphite-app bot force-pushed the 07-11-refactor_transformer_styled-components_use_atom_everywhere branch from 8f29673 to 836bf9d Compare July 11, 2025 15:28
@graphite-app graphite-app bot force-pushed the 07-11-perf_transformer_styled-components_pass_atom_instead_of_option_atom_ branch from e743157 to 242e721 Compare July 11, 2025 15:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Base automatically changed from 07-11-refactor_transformer_styled-components_use_atom_everywhere to main July 11, 2025 15:37
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
@graphite-app graphite-app bot merged commit 242e721 into main Jul 11, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-11-perf_transformer_styled-components_pass_atom_instead_of_option_atom_ branch July 11, 2025 15:38
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
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