-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parse): mutable highlight bounds (#6419)
This PR optimizes highlight bounds manipulation by: 1. Making the `highlightBounds` mutable *only when being edited* - to avoid re-creating them when inside loops 2. Replaces `for-of` implementation with `reduce` and mutable assignment, which is a bit more performant: (going with option 2 instead of the current 1): <img width="981" alt="image" src="https://github.com/user-attachments/assets/33d14062-6983-4fec-a19e-83103fb5308a"> **Manual Tests:** I hereby swear that: - [X] I opened a hydrogen project and it loaded - [X] I could navigate to various routes in Preview mode
- Loading branch information
Showing
1 changed file
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters