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

perf(gatsby): Add webpack lazyCompilation experimental flag #37040

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

LekoArts
Copy link
Contributor

@LekoArts LekoArts commented Nov 15, 2022

Description

Add https://webpack.js.org/configuration/experiments/#experimentslazycompilation to our webpack configuration. First as a feature flag, hopefully at some point the default for everyone.

TODOs

  • Get barebones project working
  • Get project with static queries working
  • TBD

Documentation

Related Issues

[ch58233]
#36852

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 15, 2022
@LekoArts LekoArts added topic: webpack/babel Webpack or babel topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 15, 2022
@nkuehn
Copy link

nkuehn commented Feb 16, 2023

For motivation to move forward with this: The effect of applying the configuration recommended in #36852 was huge in our scenario, the development server is back to its normal behavior (fast to start, slow to load a page not seen before). But simply addind the configuration in the "develop" stage also causes a certain amount of errors and timeouts in the dev server, so it would be great to see this moving forward or at least be partially applied to build stages that can handle it easier than others.

EDIT / P.S.; if there is a reasonably practical way to try this in a full application I can give feedback on the robustness.

imports: true,
},
}
config.cache.compression = `brotli`
Copy link

Choose a reason for hiding this comment

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

FYI in my measurements cache compression only impacted the size of the filesystem representation but not the in-memory representation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: DX Developer Experience (e.g. Fast Refresh, i18n, SSR, page creation, starters) topic: webpack/babel Webpack or babel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants