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

Print diagnostics for scope hoisting bailouts at verbose log level #6918

Merged
merged 2 commits into from Sep 14, 2021

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented Sep 13, 2021

This adds diagnostics for scope hoisting bailouts when you use --log-level verbose. These also include links to the docs with more info. See also: parcel-bundler/website#934.

image

Also fixed an issue where re-assigning the CommonJS module binding did not cause a bailout.

@height
Copy link

height bot commented Sep 13, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@parcel-benchmark
Copy link

parcel-benchmark commented Sep 13, 2021

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 2.24s +62.00ms
Cached 327.00ms +5.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/index.babc01ea.js 1.59kb +0.00b 1.01s +77.00ms ⚠️
dist/legacy/index.9106df33.js 1.20kb +0.00b 1.01s +76.00ms ⚠️
dist/modern/index.eb89329d.js 1.13kb +0.00b 1.01s +77.00ms ⚠️
dist/legacy/index.html 826.00b +0.00b 1.18s +65.00ms ⚠️
dist/modern/index.html 749.00b +0.00b 1.18s +66.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 678.00ms +586.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 678.00ms +585.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 678.00ms +586.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 10.28s -25.00ms
Cached 475.00ms +7.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.14m +53.00ms
Cached 1.63s -113.00ms 🚀

Cold Bundles

Bundle Size Difference Time Difference
dist/index.446eaca5.js 1.78mb +4.00b ⚠️ 19.79s +590.00ms
dist/index.c9490950.js 694.70kb +11.00b ⚠️ 52.42s +240.00ms

Cached Bundles

Bundle Size Difference Time Difference
dist/index.04d752ca.js 1.78mb -4.00b 🚀 21.11s +1.83s ⚠️
dist/pdfRenderer.4b496bac.js 1.11mb +0.00b 55.44s +3.57s ⚠️
dist/index.14c7c6a1.js 694.71kb +4.00b ⚠️ 55.41s +3.66s ⚠️
dist/editorView.f43eefc9.js 594.92kb +0.00b 54.81s +3.13s ⚠️
dist/popup.52289361.js 209.67kb +0.00b 54.81s +3.13s ⚠️
dist/EmojiPickerComponent.6ccc286a.js 146.67kb +0.00b 34.24s +13.22s ⚠️
dist/index.62333fe0.js 145.75kb +0.00b 55.41s +3.66s ⚠️
dist/Toolbar.bfe4a4c1.js 107.23kb +0.00b 54.81s +3.13s ⚠️
dist/media-viewer.0db2ffa4.js 74.93kb +0.00b 55.44s +3.58s ⚠️
dist/card.f07521ba.js 62.67kb +0.00b 55.39s +3.71s ⚠️
dist/card.5a324401.js 60.71kb +0.00b 55.44s +3.58s ⚠️
dist/Modal.f9429f1c.js 45.33kb +0.00b 54.81s +3.13s ⚠️
dist/component.066d2cfb.js 37.35kb +0.00b 21.11s +1.83s ⚠️
dist/esm.08766197.js 33.15kb +0.00b 34.25s +13.23s ⚠️
dist/component.47f637c7.js 24.94kb +0.00b 21.11s +1.83s ⚠️
dist/DatePicker.892fc408.js 22.98kb +0.00b 34.24s +13.22s ⚠️
dist/js.0f0bb621.js 17.25kb +0.00b 54.81s +16.40s ⚠️
dist/ui.c8ea15da.js 14.94kb +0.00b 54.81s +3.13s ⚠️
dist/smartMediaEditor.bbb05dcd.js 13.25kb +0.00b 54.81s +3.13s ⚠️
dist/dropzone.0d183115.js 12.15kb +0.00b 54.81s +3.13s ⚠️
dist/workerHasher.07001132.js 11.83kb +0.00b 41.01s +2.59s ⚠️
dist/component.2de9ac3a.js 6.83kb +0.00b 20.91s +1.64s ⚠️
dist/index.c177ad29.js 6.18kb +0.00b 55.44s +3.58s ⚠️
dist/card.45f850d6.js 5.77kb +0.00b 55.39s +3.65s ⚠️
dist/media-viewer.141c77cc.js 4.50kb +0.00b 41.00s +2.59s ⚠️
dist/media-viewer.22c1906b.js 3.93kb +0.00b 41.00s +2.59s ⚠️
dist/EmojiPickerComponent.55e0a64c.js 3.73kb +0.00b 54.81s +3.13s ⚠️
dist/png-chunks-extract.94b5b9fc.js 3.58kb +0.00b 54.81s +16.40s ⚠️
dist/index.57b81618.css 3.47kb +0.00b 55.70s +3.59s ⚠️
dist/dropzone.cf53fd41.js 3.29kb +0.00b 54.81s +3.13s ⚠️
dist/Modal.7f4c60b3.js 3.15kb +0.00b 55.39s +3.71s ⚠️
dist/clipboard.969d5ad7.js 2.93kb +0.00b 54.81s +3.13s ⚠️
dist/16.7b42ca8a.js 2.35kb +0.00b 21.11s +1.83s ⚠️
dist/ResourcedEmojiComponent.78f6ddfc.js 2.12kb +0.00b 54.81s +3.13s ⚠️
dist/card.6492331a.js 2.04kb +0.00b 41.00s +2.59s ⚠️
dist/date.c0482a02.js 1.87kb +0.00b 21.11s +1.83s ⚠️
dist/images.c21e6480.js 1.81kb +0.00b 22.65s +1.65s ⚠️
dist/feedback.e18b45f0.js 1.77kb +0.00b 34.24s +13.22s ⚠️
dist/16.f3960d82.js 1.74kb +0.00b 20.91s +1.64s ⚠️
dist/browser.17513657.js 1.69kb +0.00b 54.81s +3.13s ⚠️
dist/16.3aec39cf.js 1.67kb +0.00b 20.91s +1.64s ⚠️
dist/workerHasher.567cfc57.js 1.63kb +0.00b 34.25s -3.59s 🚀
dist/workerHasher.ca25f4e9.js 1.63kb +0.00b 55.44s +3.58s ⚠️
dist/list-number.e0420e0c.js 1.59kb +0.00b 22.66s +1.65s ⚠️
dist/status.f223f976.js 1.59kb +0.00b 22.66s +1.65s ⚠️
dist/code.cd95a955.js 1.51kb +0.00b 21.11s +1.83s ⚠️
dist/heading6.b3b946d1.js 1.51kb +0.00b 34.24s +13.23s ⚠️
dist/heading3.33ac6e42.js 1.50kb +0.00b 22.66s +1.65s ⚠️
dist/link.7487dc5e.js 1.43kb +0.00b 22.66s +1.65s ⚠️
dist/16.332fbe28.js 1.39kb +0.00b 20.91s +1.64s ⚠️
dist/heading5.e617db66.js 1.38kb +0.00b 34.24s +13.23s ⚠️
dist/emoji.03d3d99b.js 1.36kb +0.00b 22.65s +1.65s ⚠️
dist/16.79a0250b.js 1.34kb +0.00b 20.91s +1.64s ⚠️
dist/16.a877725f.js 1.34kb +0.00b 20.91s +1.64s ⚠️
dist/16.0eecfc6b.js 1.32kb +0.00b 20.91s +1.64s ⚠️
dist/heading2.d374048d.js 1.32kb +0.00b 22.66s +1.65s ⚠️
dist/16.01994bf0.js 1.32kb +0.00b 20.91s +1.64s ⚠️
dist/expand.1f17de7f.js 1.29kb +0.00b 34.24s +13.22s ⚠️
dist/16.00ba62db.js 1.28kb +0.00b 20.91s +1.64s ⚠️
dist/heading4.62b9719b.js 1.27kb +0.00b 22.66s +1.65s ⚠️
dist/16.8e758d30.js 1.24kb +0.00b 20.91s +1.64s ⚠️
dist/16.0555a5c0.js 1.21kb +0.00b 20.91s +1.64s ⚠️
dist/16.b114a692.js 1.20kb +0.00b 20.91s +1.64s ⚠️
dist/mention.37efe6c4.js 1.20kb +0.00b 22.66s +1.65s ⚠️
dist/16.e21a2218.js 1.19kb +0.00b 20.91s +1.64s ⚠️
dist/layout.01a386bd.js 1.18kb +0.00b 22.65s +1.65s ⚠️
dist/Modal.d35ab6da.js 1.16kb +0.00b 41.01s +2.59s ⚠️
dist/heading1.a1828016.js 1.16kb +0.00b 22.66s +1.65s ⚠️
dist/divider.601227e8.js 1.16kb +0.00b 22.65s +1.65s ⚠️
dist/quote.bb9e77b1.js 1.15kb +0.00b 22.66s +1.65s ⚠️
dist/16.922eddd1.js 1.15kb +0.00b 20.91s +1.64s ⚠️
dist/16.e92739d9.js 1.15kb +0.00b 20.91s +1.64s ⚠️
dist/16.92a42544.js 1.14kb +0.00b 20.91s +1.64s ⚠️
dist/16.e5c3bc4c.js 1.14kb +0.00b 20.91s +1.64s ⚠️
dist/16.0358f7c7.js 1.14kb +0.00b 20.91s +1.64s ⚠️
dist/action.9e337641.js 1.14kb +0.00b 21.11s +1.83s ⚠️
dist/16.455c97fa.js 1.14kb +0.00b 20.91s +1.64s ⚠️
dist/component.edb11b95.js 1.13kb +0.00b 21.11s +1.84s ⚠️
dist/media-card-analytics-error-boundary.75fac461.js 1.12kb +0.00b 54.81s +3.13s ⚠️
dist/decision.9b91a34d.js 1.12kb +0.00b 22.65s +1.65s ⚠️
dist/panel-warning.2ec3e2eb.js 1.12kb +0.00b 22.66s +1.65s ⚠️
dist/16.b221eda2.js 1.10kb +0.00b 20.91s +1.64s ⚠️
dist/list.13abafe4.js 1.09kb +0.00b 22.66s +1.65s ⚠️
dist/16.cc9a820b.js 1.06kb +0.00b 20.91s +1.64s ⚠️
dist/panel-error.9e60042f.js 1.02kb +0.00b 22.66s +1.65s ⚠️
dist/panel.d9a0dff6.js 1.01kb +0.00b 22.66s +1.65s ⚠️
dist/table.10221eb5.js 1024.00b +0.00b 22.66s +1.65s ⚠️
dist/panel-success.6b7c55df.js 980.00b +0.00b 22.66s +1.65s ⚠️
dist/panel-note.1f570859.js 976.00b +0.00b 22.66s +1.65s ⚠️
dist/media-picker-analytics-error-boundary.1602c912.js 966.00b +0.00b 54.81s +3.13s ⚠️
dist/media-viewer-analytics-error-boundary.4095f546.js 966.00b +0.00b 55.44s +3.58s ⚠️
dist/media-card-analytics-error-boundary.596dbab3.js 962.00b +0.00b 55.39s +3.71s ⚠️
dist/media-card-analytics-error-boundary.6f876fa2.js 962.00b +0.00b 55.45s +3.58s ⚠️
dist/simpleHasher.2a6e12b6.js 643.00b +0.00b 54.81s +3.13s ⚠️
dist/simpleHasher.85f7361e.js 643.00b +0.00b 55.44s +3.58s ⚠️
dist/index.html 386.00b +0.00b 55.57s +3.60s ⚠️

Three.js ✅

Timings

Description Time Difference
Cold 7.52s +1.00ms
Cached 396.00ms +14.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@@ -400,6 +400,7 @@ export default (new Transformer({
supports_module_workers: supportsModuleWorkers,
is_library: asset.env.isLibrary,
is_esm_output: asset.env.outputFormat === 'esmodule',
trace_bailouts: options.logLevel === 'verbose',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it just be a concern of the reporter to decide to show these? Is there significant overhead to always including them in diagnostic objects?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I benchmarked and it does make a measurable difference in perf. Also uses a bit more memory. I imagine there are a lot of these bailouts in large apps.

@devongovett devongovett merged commit 6dc8e68 into v2 Sep 14, 2021
@devongovett devongovett deleted the trace-bailouts branch September 14, 2021 05:12
lettertwo added a commit that referenced this pull request Sep 22, 2021
* v2:
  Upgrade Flow to 0.160.1 (#6964)
  Only use error overlay if there's a document (#6960)
  Don't fail when HTML tags are implied (#6752)
  Reorder resolveOptions() env priority (#6904)
  Change edge types to numbers (#6126)
  Bump swc (#6848)
  Print diagnostics for scope hoisting bailouts at verbose log level (#6918)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants