Skip to content

Conversation

@wardpeet
Copy link
Contributor

@wardpeet wardpeet commented Dec 16, 2021

Description

We wait for the createNode promise to resolve until the node store is synced. I've done tests on gatsbyjs.com and 1000x benchmark MD site and didn't see an immediate change in performance. Also, most source plugins do not await node creation.

We should do the same thing for deleteNode but it changes the signature of the function. Curious what others think

Documentation

Related Issues

Fixes #33871

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 16, 2021
@wardpeet wardpeet added topic: data Relates to source-nodes, internal-data-bridge, and node creation and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 16, 2021
@pieh
Copy link
Contributor

pieh commented Dec 17, 2021

We should do the same thing for deleteNode but it changes the signature of the function. Curious what others think

We already should handle this deleteNode with #33554

With that said - using above as blueprint, alternative to this PR could be to create temporary map of nodes for created node and hold them in memory until operation is completed. But if you didn't see perf diff in your test, let's go with this

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: :)

@wardpeet wardpeet merged commit c7efdb9 into master Dec 17, 2021
@wardpeet wardpeet deleted the fix/datastore-ready branch December 17, 2021 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: data Relates to source-nodes, internal-data-bridge, and node creation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gatsby-source-contentful not downloading images with downloadLocal true

3 participants