Skip to content

Commit

Permalink
(fix gatsby - redux cache) Reduced chunk size buffer from 150 gb to 1…
Browse files Browse the repository at this point in the history
….5 gb (#21993)

* (blog)Draft challenge 10 of 100daysofgatsby (#21969)

* 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>

* reduced target ceiling from 150 gb to 1.5 gb)

* Revert "(blog)Draft challenge 10 of 100daysofgatsby (#21969)"

This reverts commit 36daee0.

Co-authored-by: Hashim Warren <hashimwarren@gmail.com>
Co-authored-by: GatsbyJS Bot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: Obinna Ekwuno  <obinnacodes@gmail.com>
  • Loading branch information
3 people committed Mar 5, 2020
1 parent 252b2dc commit 7033664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby/src/redux/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function guessSafeChunkSize(values: [string, IReduxNode][]): number {
// Max size of a Buffer is 2gb (yeah, we're assuming 64bit system)
// https://stackoverflow.com/questions/8974375/whats-the-maximum-size-of-a-node-js-buffer
// Use 1.5gb as the target ceiling, allowing for some margin of error
return Math.floor((150 * 1024 * 1024 * 1024) / maxSize)
return Math.floor((1.5 * 1024 * 1024 * 1024) / maxSize)
}

function prepareCacheFolder(
Expand Down

0 comments on commit 7033664

Please sign in to comment.