-
Notifications
You must be signed in to change notification settings - Fork 920
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
improve import scanner perf #2900
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/H1UaXRGzDTLcKjhHBU2ouUeDci3T |
@@ -239,6 +242,17 @@ export default { | |||
depth = 0, | |||
) { | |||
config = config || _config; | |||
// Imports in the same project should never change once resolved. Check the momized cache here to speed up faster repeat page loads. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because I can: "momized" -> "memoized" 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is it memized? Who knows 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
words are hard :)
Are those stats the time per import? |
That's for just the antd import, although that's a pretty special edge case. The bottleneck was on the "per import within the package" processing time, and antd has something like 50 different import statements to other sub-packages within it. It's a big package... |
Hi @FredKSchott , I was being impatient here to try out new version.. pls ignore this comment it builds properly... |
Changes
Two big changes here to help the perf issues reported here: #2896 (reply in thread)
antd
first load down from ~700ms to ~300msantd
second load down from ~300ms to ~80ms.@ant-design/icons-svg
to the "never peer" list so that they get automatically bundled into any packages that request them. They're so small that this shouldn't seriously impact dev performance.Testing
Docs