Skip to content

Conversation

@ulrichstark
Copy link
Contributor

@ulrichstark ulrichstark commented Sep 29, 2025

Removed what seems like unnecessary Context wrapping of parse_jsx_assignment_expression. Please double check on that, tests are at least still all green.

Also moved more common code into parse_jsx_fragment to shorten call sites.

Copilot AI review requested due to automatic review settings September 29, 2025 09:44
@github-actions github-actions bot added A-parser Area - Parser C-performance Category - Solution not expected to change functional behavior, only performance labels Sep 29, 2025
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 optimizes JSX parsing performance by eliminating unnecessary checkpoint/rewind operations and streamlining span construction. The changes focus on reducing parser overhead during JSX fragment and element parsing.

  • Removes checkpoint/rewind mechanism when parsing JSX closing fragments/elements
  • Eliminates the parse_jsx_assignment_expression wrapper function in favor of direct parse_expr() calls
  • Optimizes span construction by avoiding intermediate span allocations and using direct calculations

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

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 29, 2025

CodSpeed Instrumentation Performance Report

Merging #14234 will not alter performance

Comparing ulrichstark:cleanup-and-optimize-parsing-jsx (c18c0df) with main (1b0519c)

Summary

✅ 37 untouched

@ulrichstark ulrichstark force-pushed the cleanup-and-optimize-parsing-jsx branch from 8c6897b to b01f81a Compare September 29, 2025 10:12
@Boshen Boshen self-assigned this Sep 29, 2025
@ulrichstark ulrichstark force-pushed the cleanup-and-optimize-parsing-jsx branch from b01f81a to c18c0df Compare September 29, 2025 10:25
@Boshen Boshen merged commit ff3c240 into oxc-project:main Sep 30, 2025
30 checks passed
@ulrichstark ulrichstark deleted the cleanup-and-optimize-parsing-jsx branch October 4, 2025 15:25
@Boshen Boshen mentioned this pull request Oct 6, 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.

3 participants