Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(file-router): improve the speed of the HMR injection #2411

Merged
merged 7 commits into from
May 14, 2024

Conversation

Lodin
Copy link
Contributor

@Lodin Lodin commented May 13, 2024

Fixes #2410.

It looks like the lookbehind feature in RegExp is extremely slow. I replaced it with the regular RegExp, and according to my measurements, it is almost instant.

@Lodin Lodin added the hilla Issues related to Hilla label May 13, 2024
@Lodin Lodin requested review from platosha and Artur- May 13, 2024 12:17
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.11%. Comparing base (1966c94) to head (26d4b55).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2411      +/-   ##
==========================================
- Coverage   95.18%   95.11%   -0.07%     
==========================================
  Files          66       66              
  Lines        4507     4507              
  Branches      644      645       +1     
==========================================
- Hits         4290     4287       -3     
- Misses        176      179       +3     
  Partials       41       41              
Flag Coverage Δ
unittests 95.11% <100.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lodin Lodin enabled auto-merge (squash) May 14, 2024 10:33
Copy link

sonarcloud bot commented May 14, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Lodin Lodin merged commit ca94fb5 into main May 14, 2024
13 of 14 checks passed
@Lodin Lodin deleted the fix/file/slow-regex branch May 14, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FS router plugin takes 30s to process a ~600 line tsx file
3 participants