-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
(fix gatsby - redux cache) Reduced chunk size buffer from 150 gb to 1.5 gb #21993
Conversation
* Draft challenge 10 of 100daysofgatsby * chore: format * Fix challenge number * Fix typos and add addititional links. * Update docs/blog/100days/performance/index.md Co-Authored-By: Obinna Ekwuno <obinnacodes@gmail.com> * Remove "first person" as per style guide Co-authored-by: GatsbyJS Bot <mathews.kyle+gatsbybot@gmail.com> Co-authored-by: Obinna Ekwuno <obinnacodes@gmail.com>
cc @pvdz |
@bebrian458 a sort of weird nit, do you mind getting rid of the commits that include Hashim's 100 days of Gatsby blog post? |
That's not a weird nit! My typo isn't weird! Code review isn't weird! But also, thank you. That's a weird error indeed :( |
This reverts commit 36daee0.
But. That probably means my fixes unblocked you. I'm happy about that :D (If it weren't for my fix, you would be hitting that Buffer length limit not due to a bug, but simply because it wasn't designed to support that size :) ) Can you share some stats about your site? Why are you hitting this limit? Large page count or large page contents? How long does it take to build? What kind of site is it? Cu-ri-ous! |
Holy buckets, @bebrian458 — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Just published a patch under |
Description
One of my team members @j218 noticed a buffer issue when trying to run build on our gatsby app with large amounts of rich text content.
We were able to narrow it down to a redux caching issue. There seems to have been an attempt in fixing this by chunking the nodes. However, we noticed a slight math error. The intention was to chunk nodes to fit into a 1.5gb buffer, but the calculations indicate chunking for a 150gb buffer. Assuming that the max buffer length of node is 2GB, this calculation issue would create a huge chunk size if the the entries contained a large amount of content. Thus, the issue would always cause the number of chunks to equal one (essentially performing no actual chunking) and cause the issue shown in the screenshot above.
We have made the fix to chunk the nodes to fit into a 1.5 gb cache.
Fixes #17233