-
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
perf(gatsby-cli): throttle progress bar, build much faster this way #19866
Conversation
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.
Can we make sure in progressActivity.done()
to flush any potential pending updates to make sure when activity finishes, the progress / total are set correctly?
Something like updateProgress(force: true)
, which will be no-op unless something is pending
Done. Will now force flush pending updates before resolving the |
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.
LGTM
Hmmm, I did not intend to skip cloud checks. The merge on green label seems to skip them. Good to know. I think it's fine for this one. |
Published in |
This change explicitly throttles the progress bar updates (
tick
andtotal
) to be clamped to 10 fps max.This drops the govbook benchmark from 210 seconds down to 140 seconds. Makes the build about as fast as with
CI=true
andGATSBY_LOGGER=yurnalist
.(Note: Many CI's automatically enable this so you won't see a difference there. But many people are unaware of the
CI
flag and this will make a huge difference for larger sites, or sites with many images.)Fixes #15505
Fixes #17452
Fixes #17966
Fixes #18801
Relates to #17873
Relates to vadimdemedes/ink#212