LMDB data storage #31769
Replies: 4 comments 4 replies
-
Hi, I run into an issue with the latest version of lmdb-store. Build log
|
Beta Was this translation helpful? Give feedback.
-
When trying to add a new page with this flag active, I get build failure with the error System: |
Beta Was this translation helpful? Give feedback.
-
We're running into an error, I wanted to leave it here in case the team has any input. We're able to resolve it by installing msgpackr. Which is odd, since it is a dependency.
Expand build output
We're on Gatsby 3.14.2 |
Beta Was this translation helpful? Give feedback.
-
Is there a way to opt out of using LMDB (or caching in general, for that matter) for develop in Gatsby 4? "Source and transform nodes" is dog slow (creates ~4 nodes per second) when processing a large (44MB) JSON file with an array of objects, and by the looks of a CPU snapshot, the slowness comes down to LMDB operations. |
Beta Was this translation helpful? Give feedback.
-
We're introducing a new data storage option: lmdb-store. So instead of keeping nodes in memory (as it's in Redux), they are instantly saved to this persistent embeddable storage. This will be beneficial for larger sites that can run into OOMs. Several other performance improvements using this new data store will follow.
Original PR adding this: #31371
How to use
Make sure that you're on
[email protected]
or above and that you're using Node > 14.10.Add the
LMDB_STORE
flag to yourgatsby-config.js
:Install
lmdb-store
as a dependency:npm install lmdb-store
Your feedback
We're very much looking for feedback from you using this new data storage! We'll expand this section with more asks and details in the future, but for now our specific asks would be:
--verbose
flag =>gatsby build --verbose
Notes
It may actually cause some memory overhead (average memory usage increases but peak memory spikes decrease, so fewer OOMs) + 10-15% slowdown during sourcing. Eventually, we will cut those down but that's the first step.
Constraints
It imposes some additional constraints to plugins and gatsby sites, namely:
NODE___featuredImage
after a node was created)Beta Was this translation helpful? Give feedback.
All reactions