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

performance: avoid paying decodeFastbootSwitch regex cost unless needed #1611

Conversation

raycohen
Copy link
Contributor

@raycohen raycohen commented Sep 25, 2023

Ref #1610

Before this change, my large app was spending 20+ seconds on the regex:

Screenshot 2023-09-25 at 9 58 19 AM

After this change, it spends no time here (my app does not use fastboot, so the condition is never met). I think this condition will be correct for users that do use fastboot.

@ef4 ef4 marked this pull request as ready for review September 26, 2023 15:42
Copy link
Contributor

@ef4 ef4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good. Can you do the same fix for decodeVirtualPairComponent and decodeImplicitModules?

I don't want us to forget those ones as well.

@raycohen
Copy link
Contributor Author

Sure, I can add those to this PR

@raycohen raycohen force-pushed the perf-run-regex-on-fewer-files-in-decodeFastbootSwitch branch from 404b014 to 2d08d0c Compare September 26, 2023 18:08
@ef4 ef4 added the enhancement New feature or request label Sep 26, 2023
@ef4 ef4 merged commit a449708 into embroider-build:main Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants