Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Sep 27, 2025

No description provided.

Copilot AI review requested due to automatic review settings September 27, 2025 14:20
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 27, 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.

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

Apply the #[cold] attribute to error handling functions in the parser to improve performance by optimizing code layout for hot paths.

  • Mark error handling functions as #[cold] to help LLVM optimize instruction cache utilization
  • Target functions that only execute during parsing errors or rare edge cases
  • Exclude lexer from optimization as requested

Reviewed Changes

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

File Description
crates/oxc_parser/src/lib.rs Mark overlong_error() as cold for handling >4GB files
crates/oxc_parser/src/js/class.rs Mark check_getter() and check_setter() as cold for validation errors
crates/oxc_parser/src/error_handler.rs Mark set_unexpected() and unexpected() as cold for error paths

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added A-parser Area - Parser C-performance Category - Solution not expected to change functional behavior, only performance labels Sep 27, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 27, 2025
Copy link
Member Author

Boshen commented Sep 27, 2025

Merge activity

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 27, 2025

CodSpeed Instrumentation Performance Report

Merging #14188 will not alter performance

Comparing perf/parser-cold-paths (5b74a81) with main (358f2fc)

Summary

✅ 37 untouched

@graphite-app graphite-app bot force-pushed the perf/parser-cold-paths branch from dcac5ce to 5b74a81 Compare September 27, 2025 14:28
@graphite-app graphite-app bot merged commit 5b74a81 into main Sep 27, 2025
28 checks passed
@graphite-app graphite-app bot deleted the perf/parser-cold-paths branch September 27, 2025 14:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser 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