-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Improve performance of incremental bundling #8583
Conversation
return graph; | ||
} | ||
} | ||
|
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.
These cases were never hit at all in the tests, and should be very rare. I think removing the traversal to compute the hashes in the common case outweighs the potential benefits for zero change builds.
Benchmark ResultsKitchen Sink ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. React HackerNews 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... AtlasKit Editor 🚨
Timings
Cold BundlesNo bundles found, this is probably a failed build... Cached BundlesNo bundles found, this is probably a failed build... Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
|
Did you commit that? I don't see where that's done |
Yeah, the getCacheKey function was deleted and replaced with this.cacheKey |
But neither RequestGraph nor RequestTracker contain changes? Did you mean
|
Oh, oops, yes that is exactly what I meant. 🤦 |
// If any subrequests are invalid (e.g. dev dep requests or config requests), | ||
// bail on incremental bundling. We also need to invalidate for option changes, | ||
// which are hoisted to direct invalidations on the bundle graph request. | ||
let subRequestsInvalid = |
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.
Does this mean that changes like adding a runtime would stop incremental bundling from happening? Thats the only issue I encountered when trying to not apply runtimes for incremental.
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.
Yeah, if any config changes or plugin changes occurred, then bundling will not be incremental. I think this should be pretty rare so probably acceptable?
This is a refactor of #6514, which improves performance even more.