Skip to content

ci(benchmarks): benchmark parser with tokens and ESTree tokens conversion#19649

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion
Feb 24, 2026
Merged

ci(benchmarks): benchmark parser with tokens and ESTree tokens conversion#19649
graphite-app[bot] merged 1 commit intomainfrom
om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 23, 2026

Add benchmarks for:

  1. Parsing with tokens.
  2. Serializing tokens to ESTree-style JSON.

Neither of these benchmarks needs to be kept indefinitely, but they'll be useful while working on the tokens code. There's a lot of room for optimization.

Copy link
Member Author

overlookmotel commented Feb 23, 2026


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 23, 2026

Merging this PR will not alter performance

✅ 47 untouched benchmarks
🆕 5 new benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
🆕 Simulation estree_tokens[checker.ts] N/A 326.3 ms N/A
🆕 Simulation parser_tokens[cal.com.tsx] N/A 33.4 ms N/A
🆕 Simulation parser_tokens[RadixUIAdoptionSection.jsx] N/A 97.6 µs N/A
🆕 Simulation parser_tokens[binder.ts] N/A 4.5 ms N/A
🆕 Simulation parser_tokens[react.development.js] N/A 1.8 ms N/A

Comparing om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion (bfb6d8f) with c/02-17-feat_oxlint_integrate_shared_estree_tokens_and_remove_ts_fallback (02e847f)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on c/02-17-feat_oxlint_integrate_shared_estree_tokens_and_remove_ts_fallback (501772e) during the generation of this report, so 67ec9e7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new benchmark functions to measure the performance of parsing with tokens and converting tokens to ESTree-style JSON format. These benchmarks complement the existing parser and ESTree benchmarks and will help optimize the token handling code.

Changes:

  • Added bench_parser_tokens to benchmark parsing with token collection enabled
  • Added bench_estree_tokens to benchmark ESTree token serialization to JSON
  • Added oxc_estree_tokens dependency to the benchmark crate

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
tasks/benchmark/benches/parser.rs Added two new benchmark functions (bench_parser_tokens and bench_estree_tokens) and updated the criterion_group to include them
tasks/benchmark/Cargo.toml Added oxc_estree_tokens as an optional dependency and included it in the "compiler" feature
Cargo.lock Updated lock file to reflect the new dependency in the benchmark crate

@graphite-app graphite-app bot force-pushed the c/02-17-feat_oxlint_integrate_shared_estree_tokens_and_remove_ts_fallback branch from d4ac87a to 0a4edbb Compare February 24, 2026 02:45
@graphite-app graphite-app bot requested a review from camc314 as a code owner February 24, 2026 02:45
@graphite-app graphite-app bot force-pushed the om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion branch from ee09cd5 to 7377b75 Compare February 24, 2026 02:46
@graphite-app graphite-app bot force-pushed the c/02-17-feat_oxlint_integrate_shared_estree_tokens_and_remove_ts_fallback branch from 0a4edbb to 1349954 Compare February 24, 2026 03:06
@graphite-app graphite-app bot requested a review from Dunqing as a code owner February 24, 2026 03:06
@graphite-app graphite-app bot force-pushed the om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion branch from 7377b75 to 3d2d7c1 Compare February 24, 2026 03:07
@overlookmotel overlookmotel removed the request for review from Dunqing February 24, 2026 09:44
@graphite-app graphite-app bot merged commit d6f8b9f into main Feb 24, 2026
23 checks passed
@graphite-app graphite-app bot deleted the om/02-23-ci_benchmarks_benchmark_parser_with_tokens_and_estree_tokens_conversion branch February 24, 2026 11:38
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 24, 2026
graphite-app bot pushed a commit that referenced this pull request Feb 24, 2026
Fix a typo spotted by AI review in #19649.
This was referenced Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins A-parser Area - Parser C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants