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): don't create Head modules in develop if it's not used #37619

Merged
merged 4 commits into from
Feb 7, 2023

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Feb 6, 2023

Description

Right now, in develop we create Head modules for every page template even if that template doesn't actually implement Head. Theorhetically this would be fine, but on larger projects this result in quite an increase of needed memory by webpack compilation, so this PR is crude way to limit impact of it by allowing memory usage be more in line with what it used to be before Head API was introduced.

As we do want people to use that API over alternatives we will have to figure out how memory usage can be optimized when Head is actually implemented by templates

Documentation

Related Issues

#36899

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 6, 2023
@pieh pieh added topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 6, 2023
@pieh
Copy link
Contributor Author

pieh commented Feb 6, 2023

The failing tests uncovered at least some issues in file-parser which doesn't find all the exports (depending on syntax), so will be looking into it more now

@pieh pieh marked this pull request as ready for review February 7, 2023 07:15
@LekoArts LekoArts added the topic: performance Related to runtime & build performance label Feb 7, 2023
@LekoArts LekoArts merged commit 890396e into master Feb 7, 2023
@LekoArts LekoArts deleted the perf-head-async-r branch February 7, 2023 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Relates to Gatsby's core (e.g. page loading, reporter, state machine) topic: performance Related to runtime & build performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants