-
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-source-drupal): cache backlink records #33444
Conversation
…fore filtering (#33181) (#33228) * fix(gatsby-source-drupal): check relationships type exists on node before filtering * Update packages/gatsby-source-drupal/src/utils.js Co-authored-by: Dustin Schau <[email protected]> * format Co-authored-by: Dustin Schau <[email protected]> (cherry picked from commit d4f8355) Co-authored-by: Kyle Mathews <[email protected]>
- [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected]
…l-inc-build-backlink-fix-pr
backRefsNamesLookup = new Map(JSON.parse(backRefsNamesLookupStr)) | ||
} | ||
|
||
if (referencedNodesLookupStr) { | ||
referencedNodesLookup = new Map(JSON.parse(referencedNodesLookupStr)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this can become very memory expensive. Does this run on PSU without problems? If not we should look into http://ndjson.org/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it on a smaller site but good point — lemme test how expensive this is for a PSU-sized site
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rss increases about 400mb while stringifying the two maps into a totoal of ~85 million characters. Execution time is ~600ms.
I think reasonable enough given how big PSU is — they're using ~6.5gb already at this point so this is a temp 15% bump in memory use that'll be GCed fairly soon after that.
* fix(gatsby-source-drupal): check relationships type exists on node before filtering (#33181) (#33228) * fix(gatsby-source-drupal): check relationships type exists on node before filtering * Update packages/gatsby-source-drupal/src/utils.js Co-authored-by: Dustin Schau <[email protected]> * format Co-authored-by: Dustin Schau <[email protected]> (cherry picked from commit d4f8355) Co-authored-by: Kyle Mathews <[email protected]> * chore(release): Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Preserve backlink/reference lookup tables in cache * test * fix bad merge * try try again * Improve log * Get working with tests Co-authored-by: GatsbyJS Bot <[email protected]> Co-authored-by: Vladimir Razuvaev <[email protected]> Co-authored-by: Krzysztof Szot <[email protected]> (cherry picked from commit 0def3ac)
* fix(gatsby-source-drupal): check relationships type exists on node before filtering (#33181) (#33228) * fix(gatsby-source-drupal): check relationships type exists on node before filtering * Update packages/gatsby-source-drupal/src/utils.js Co-authored-by: Dustin Schau <[email protected]> * format Co-authored-by: Dustin Schau <[email protected]> (cherry picked from commit d4f8355) Co-authored-by: Kyle Mathews <[email protected]> * chore(release): Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Preserve backlink/reference lookup tables in cache * test * fix bad merge * try try again * Improve log * Get working with tests Co-authored-by: GatsbyJS Bot <[email protected]> Co-authored-by: Vladimir Razuvaev <[email protected]> Co-authored-by: Krzysztof Szot <[email protected]> (cherry picked from commit 0def3ac) Co-authored-by: Kyle Mathews <[email protected]>
* fix(gatsby-source-drupal): check relationships type exists on node before filtering (gatsbyjs#33181) (gatsbyjs#33228) * fix(gatsby-source-drupal): check relationships type exists on node before filtering * Update packages/gatsby-source-drupal/src/utils.js Co-authored-by: Dustin Schau <[email protected]> * format Co-authored-by: Dustin Schau <[email protected]> (cherry picked from commit d4f8355) Co-authored-by: Kyle Mathews <[email protected]> * chore(release): Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Preserve backlink/reference lookup tables in cache * test * fix bad merge * try try again * Improve log * Get working with tests Co-authored-by: GatsbyJS Bot <[email protected]> Co-authored-by: Vladimir Razuvaev <[email protected]> Co-authored-by: Krzysztof Szot <[email protected]>
* fix(gatsby-source-drupal): check relationships type exists on node before filtering (#33181) (#33228) * fix(gatsby-source-drupal): check relationships type exists on node before filtering * Update packages/gatsby-source-drupal/src/utils.js Co-authored-by: Dustin Schau <[email protected]> * format Co-authored-by: Dustin Schau <[email protected]> (cherry picked from commit d4f8355) Co-authored-by: Kyle Mathews <[email protected]> * chore(release): Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * Preserve backlink/reference lookup tables in cache * test * fix bad merge * try try again * Improve log * Get working with tests Co-authored-by: GatsbyJS Bot <[email protected]> Co-authored-by: Vladimir Razuvaev <[email protected]> Co-authored-by: Krzysztof Szot <[email protected]>
Write the in-memory lookup map to the cache after a successful run of "sourceNodes" and reload it for use in subsequent builds.
This fixes an issue where backlinks aren't preserved properly for incremental node updates with a warm cache.
Fixes #33267