Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 17, 2025

#9777 made > or } in JSXText a parser error, so react/no_unescaped_entities rule can be simplified.

Speed it up a little by:

  • Using raw field instead of slicing source.
  • Iterating over the string as bytes, instead of chars.
  • Using static strings for errors.

@github-actions github-actions bot added A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance labels Mar 17, 2025
Copy link
Member Author


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.

@overlookmotel overlookmotel marked this pull request as ready for review March 17, 2025 13:52
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 17, 2025

CodSpeed Performance Report

Merging #9832 will not alter performance

Comparing 03-17-perf_linter_no_unescaped_entities_optimize_string_search_and_error_generation (2b65ed2) with main (6fc26db)

Summary

✅ 33 untouched benchmarks

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Mar 17, 2025
Copy link
Member

Boshen commented Mar 17, 2025

Merge activity

  • Mar 17, 10:09 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 17, 10:09 AM EDT: A user added this pull request to the Graphite merge queue.
  • Mar 17, 10:21 AM EDT: A user merged this pull request with the Graphite merge queue.

…generation (#9832)

#9777 made `>` or `}` in `JSXText` a parser error, so `react/no_unescaped_entities` rule can be simplified.

Speed it up a little by:

* Using `raw` field instead of slicing source.
* Iterating over the string as bytes, instead of `char`s.
* Using static strings for errors.
@graphite-app graphite-app bot force-pushed the 03-17-perf_linter_no_unescaped_entities_optimize_string_search_and_error_generation branch from f9ee906 to 2b65ed2 Compare March 17, 2025 14:15
@graphite-app graphite-app bot merged commit 2b65ed2 into main Mar 17, 2025
26 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 17, 2025
@graphite-app graphite-app bot deleted the 03-17-perf_linter_no_unescaped_entities_optimize_string_search_and_error_generation branch March 17, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter 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