Skip to content
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

perf(develop): don't use debug config for bluebird #28957

Merged
merged 2 commits into from Jan 11, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Jan 10, 2021

Description

In gatsby develop we use debug build of bluebird currently which adds quite significant overhead. This is particularly visible on larger sites with large amount of nodes when we spawn tens of thousands onCreateNode runs.

  • In tested site gatsby develop was crashing with OOM error. This change allow to not hit this crash without adjusting --max_old_space_size.
  • Tested site with --max_old_space_size=10000 before and after this change - source nodes step drops from ~67.87s (average across 3 runs) to ~21.7s (average across 3 runs)

Related Issues

Fixes #28916
Fixes datocms/gatsby-source-datocms#123
Fixes datocms/gatsby-source-datocms#134
[ch21729]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 10, 2021
@pieh pieh added topic: scaling builds and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 10, 2021
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

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

Great perf improvement! Thanks 👍

@pieh pieh added this to To cherry-pick in V2 Release hotfixes via automation Jan 11, 2021
@pieh pieh merged commit 125f571 into master Jan 11, 2021
@pieh pieh deleted the perf/develop/dont-use-bluebird-long-stack-traces branch January 11, 2021 10:59
vladar pushed a commit that referenced this pull request Jan 12, 2021
* perf(develop): don't use debug config for bluebird

* Update api-runner-node.js

(cherry picked from commit 125f571)
@vladar vladar moved this from To cherry-pick to Backport PR opened in V2 Release hotfixes Jan 12, 2021
gatsbybot pushed a commit that referenced this pull request Jan 13, 2021
* perf(develop): don't use debug config for bluebird

* Update api-runner-node.js

(cherry picked from commit 125f571)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
@vladar vladar moved this from Backport PR opened to Backported in V2 Release hotfixes Jan 13, 2021
@vladar
Copy link
Contributor

vladar commented Jan 13, 2021

Published in gatsby@2.30.2

@vladar vladar moved this from Backported to Archived in V2 Release hotfixes Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3 participants