-
-
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
Update without bundling for a 'simple' non-dependency related change #6514
Conversation
|
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
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 BundlesNo bundle changes detected. |
9b91be6
to
6c1e807
Compare
Co-authored-by: Niklas Mischkulnig <[email protected]>
@@ -285,7 +337,7 @@ class BundlerRunner { | |||
|
|||
await this.nameBundles(internalBundleGraph); | |||
|
|||
let changedAssets = await applyRuntimes({ | |||
let changedRuntimes = await applyRuntimes({ |
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.
Why do we need to apply runtimes in an incremental non-dependency update? I profiled, and after this change, applyRuntimes is still taking a significant amount of time. Is it because naming also occurs, and could potentially change bundle names? Should we disable both of these from running on incremental updates in dev? Development builds don't use content hashes anyway...
Something I noticed is that initial uncached builds appear to be significantly slower with this branch vs v2. The no dependency change builds are indeed faster though.
This seems to be repeatable for me, i.e. not some environmental factor. In verbose logging mode, I also noticed more output, almost like it was rebuilding the same assets multiple times. Maybe related? |
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.
Going to merge this and refactor slightly to handle my comment above re runtimes.
↪️ Pull Request
[UPDATE from @AGawrys ] This PR now makes the default behavior to skip bundles on "simple" cases. To opt-out, users will need to specify
--no-incremental
or need to setNO_INCREMENTAL=1
for tests.This is automatically disabled for production builds, config changes, and dependency related bundling scenarios.
This the most basic example of incrementally bundling, adding something like:
The behavior now looks into whether the update should force a full re-bundle or re-use the existing bundle graph.
When to do a full re-bundle
💻 Examples
🚨 Test instructions
✔️ PR Todo