Skip to content

refactor(span): implement Serialize manually for Atom#9196

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-18-refactor_span_implement_serialize_manually_for_atom_
Feb 18, 2025
Merged

refactor(span): implement Serialize manually for Atom#9196
graphite-app[bot] merged 1 commit intomainfrom
02-18-refactor_span_implement_serialize_manually_for_atom_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 18, 2025

The Serialize impl for Atom is trivial, so there's no need to use #[derive(Serialize)] on it - just implement it by hand.

This is another step towards removing serde-derive from oxc_span and oxc_ast, which when complete will greatly improve compile times.

Also shorten the code for impl Serialize for CompactStr. That change is pure style refactor.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 18, 2025
Copy link
Member Author

overlookmotel commented Feb 18, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 18, 2025

CodSpeed Performance Report

Merging #9196 will not alter performance

Comparing 02-18-refactor_span_implement_serialize_manually_for_atom_ (be27164) with main (4a92839)

Summary

✅ 33 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 02-18-refactor_ast_estree_simplify_serializing_formalparameters_ branch from bace421 to 58fabd2 Compare February 18, 2025 10:11
@overlookmotel overlookmotel force-pushed the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch from af2a0be to 2ecd03d Compare February 18, 2025 10:11
@overlookmotel overlookmotel marked this pull request as draft February 18, 2025 10:12
@overlookmotel
Copy link
Member Author

Merging #9196 will improve performances by ×2,000

What the hell? Something is clearly wrong!

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 18, 2025
@overlookmotel overlookmotel removed the 0-merge Merge with Graphite Merge Queue label Feb 18, 2025
@overlookmotel
Copy link
Member Author

Merging #9196 will improve performances by ×2,000

What the hell? Something is clearly wrong!

I force pushed (without changing any code) and it's gone back to normal now. I guess must have been a temporary blip. I guess the fixture file for that benchmark was not downloaded, so it ran on an empty file - which obviously is very much faster.

@Boshen Boshen changed the base branch from 02-18-refactor_ast_estree_simplify_serializing_formalparameters_ to graphite-base/9196 February 18, 2025 10:36
@Boshen Boshen force-pushed the graphite-base/9196 branch from 58fabd2 to 3236fe4 Compare February 18, 2025 10:43
@Boshen Boshen force-pushed the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch from 2ecd03d to 0cd2e29 Compare February 18, 2025 10:43
@Boshen Boshen changed the base branch from graphite-base/9196 to main February 18, 2025 10:44
@Boshen Boshen force-pushed the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch from 0cd2e29 to 74e519b Compare February 18, 2025 10:44
@overlookmotel overlookmotel force-pushed the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch from 74e519b to b1877f4 Compare February 18, 2025 13:30
@overlookmotel overlookmotel marked this pull request as ready for review February 18, 2025 13:46
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 18, 2025
Copy link
Member Author

overlookmotel commented Feb 18, 2025

Merge activity

  • Feb 18, 8:46 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 18, 8:46 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 18, 8:51 AM EST: A user merged this pull request with the Graphite merge queue.

The `Serialize` impl for `Atom` is trivial, so there's no need to use `#[derive(Serialize)]` on it - just implement it by hand.

This is another step towards removing `serde-derive` from `oxc_span` and `oxc_ast`, which when complete will greatly improve compile times.

Also shorten the code for `impl Serialize for CompactStr`. That change is pure style refactor.
@graphite-app graphite-app bot force-pushed the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch from b1877f4 to be27164 Compare February 18, 2025 13:46
@graphite-app graphite-app bot merged commit be27164 into main Feb 18, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-18-refactor_span_implement_serialize_manually_for_atom_ branch February 18, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants