-
Notifications
You must be signed in to change notification settings - Fork 140
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
Reduce load times #348
Comments
https://github.com/siddharthkp/bundlesize looks like a pretty good way to make sure we lock in improvements here |
Cross-post from #1031: I feel like it was broken at some point but the Webpack Visualizer is working great now, ton of low-hanging fruit in here. I’d be inclined to try pulling out some of the big libraries that we don’t need for minimal bootstrap ( |
@ajgreenb also one other thing I’m noticing that may be worth investigating—when I do a cold load and inspect the Network tab, many resources seem to be spending an alarming amount of time in a “Request to ServiceWorker” phase. Not sure what’s up with it but might be worth looking into… |
Cool, I'll check in on both of those things. Earlier tonight, I tried taking a recording using the Performance tab of the developer tools from a refresh but the recording never loaded (the tab just hung.) Have you tried that/had any luck?
|
@ajgreenb hmm yep, was able to just run a Performance recording of the production app loading now—here’s a dump if it’s useful! |
@outoftime I took a look into lodash's contribution to the bundle size. From what I can tell, we are benefitting from a la carte module loading. The reason we see that large section from lodash in the sunburst chart from Webpack Visualizer is that stylelint imports the entire lodash library. You can verify this by using the select menu in Webpack Visualizer to filter the chart to just the |
@ajgreenb good investigaish! I think that probably explains what I was seeing, although it’s still not great that stylelint is importing the entirety of lodash (it’s less bad to have bloat in the async chunks but still bad). Can we run stylelint through |
Darn, looks like |
@ajgbreenb rats!! maybe we submit a patch upstream to stylelint? a quick Google search does not yield an existing codemod but it seems like such a thing should be fairly easy to write… (also i would only propose doing any of this at such time as the stylelint-imported lodash is the worst offender for bundle bloat, which i’d conjecture won’t be the case for a little while) |
Word. I'll back-burner patching stylelint and come back to it after I've spent some time optimizing the Seems like a codemod for compiling CommonJS to ES2015 would be high in demand. I wonder if it doesn't exist because CommonJS supports dynamic and conditional |
@ajgreenb sounds good! although I should clarify that I was talking about patching stylelint to do discrete lodash module imports, not to switch to ES6-style static imports. i’m guessing there is probably a codemod for the latter ; ) |
@ajgreenb have you come across https://www.npmjs.com/package/html-webpack-inline-chunk-plugin ? The |
@outoftime we already use the *deep breath* inline-chunk-manifest-html-webpack-plugin for this! |
Leaving this here for later: |
The goal here is to optimize load time for a fresh session, i.e. navigating to
https://popcode.org
without having been recently logged in, no gist or snapshot URL, etc.moment
text-encoding
Webpack visualizer is a great tool for finding the worst offenders in our bundle size.
The text was updated successfully, but these errors were encountered: