Specify "critical data" for the incremental build #34213
Unanswered
AdrianGuery
asked this question in
Help
Replies: 1 comment 3 replies
-
|
Page queries are incremental as well. You can see that with e.g. the blog starter where you do a build, make a change to a markdown file, and rebuild and see that only the corresponding page query was run. What you're seeing I'm guessing is that your pages query "connections" (i.e. Ways around this include:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello !
I'm currently working on a big Gatsby site (10,000+ pages) and we're trying to optimize build times. Because currently we take more than 5 minutes to build it locally (on high-performance machines).
The incremental build works well, it allows us to optimize time of the build of HTML pages. We managed to get off in less than 4 minutes.
But that doesn't optimize "pages queries" at all, and it is this part that takes us the most time (160 seconds). This seems logical (if I understood correctly how the incremental build works) because the pages queries are run to see if their result change compared to the cache and then see if Gatsby is using the cache or needs to regenerate the page.
Would there be a way to tell to Gatsby, even before he does the pages queries, whether he should use the cache or not ?
For example, by specifying that if the "last_mod" data of the page (which is got during the Bootstrap phase) has changed so Gatsby must do the queries and regenerate the pages, otherwise Gatsby takes the cache and don't run pages queries .
Maybe you have another idea for the optimization?
Thanks a lot
Beta Was this translation helpful? Give feedback.
All reactions