-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby): use V8.serialize instead of JSON.stringify if available (…
…#10732) Use `v8.serialize` instead of `json-stringify-safe` (if available) for persisting redux state to fix OOM issues and small performance gain (from ~250ms to ~150ms in the markdown benchmark).
- Loading branch information
1 parent
e010778
commit c043816
Showing
8 changed files
with
308 additions
and
84 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
packages/gatsby/src/db/__tests__/__snapshots__/node-tracking-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`track root nodes Node sanitization Remove not supported fields / values 1`] = ` | ||
Object { | ||
"children": Array [], | ||
"id": "id1", | ||
"inlineArray": Array [ | ||
1, | ||
2, | ||
3, | ||
], | ||
"inlineObject": Object { | ||
"field": "fieldOfFirstNode", | ||
}, | ||
"internal": Object { | ||
"contentDigest": "digest1", | ||
"owner": "test", | ||
"type": "Test", | ||
}, | ||
"parent": null, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/gatsby/src/redux/__tests__/__snapshots__/index.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`redux db should write cache to disk 1`] = ` | ||
Object { | ||
"componentDataDependencies": Object { | ||
"connections": Object {}, | ||
"nodes": Object {}, | ||
}, | ||
"components": Map { | ||
"/Users/username/dev/site/src/templates/my-sweet-new-page.js" => Object { | ||
"componentPath": "/Users/username/dev/site/src/templates/my-sweet-new-page.js", | ||
"isInBootstrap": true, | ||
"pages": Array [ | ||
"/my-sweet-new-page/", | ||
], | ||
"query": "", | ||
}, | ||
}, | ||
"jsonDataPaths": Object {}, | ||
"staticQueryComponents": Map {}, | ||
"status": Object { | ||
"plugins": Object {}, | ||
}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.