Skip to content

Conversation

@pvdz
Copy link
Contributor

@pvdz pvdz commented Oct 14, 2020

Before it was doing a .includes on an array, searching for a particular sys.id. But that list could potentially have thousands of elements.

By this changes it creates a single Set of deleted ids, which has a much better lookup time, and can be used by both loops.

@pvdz pvdz added topic: performance Related to runtime & build performance topic: scaling builds topic: source-contentful Related to Gatsby's integration with Contentful labels Oct 14, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 14, 2020
@pvdz pvdz requested a review from axe312ger October 14, 2020 13:28
@pvdz pvdz removed the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Oct 14, 2020
Copy link
Contributor

@axe312ger axe312ger left a comment

Choose a reason for hiding this comment

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

Sweet. Clean, readable and for sure faster. Thanks!

@pvdz pvdz merged commit 9d304ed into master Oct 15, 2020
@delete-merged-branch delete-merged-branch bot deleted the contentful_mergesync branch October 15, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: performance Related to runtime & build performance topic: source-contentful Related to Gatsby's integration with Contentful

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants