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

P2X-1023 exclude inline assests from PRL #9194

Merged
merged 6 commits into from
Aug 17, 2023

Conversation

irismoini
Copy link
Contributor

@irismoini irismoini commented Aug 15, 2023

↪️ Pull Request

Currently, inline assets are counted towards Parcel's Parallel Request Limit (PRL) when they shouldn't be. This PR filters out inline assets in the PRL count.

💻 Examples

For example, if the PRL is set to two and there is one individual bundle, one shared bundle, and one inline asset (three bundles total) in a single bundle group, the shared bundle should not be removed in order to meet the PRL. This is because the inline asset should not count toward the PRL to begin with.

Screenshot 2023-08-15 at 4 09 55 PM

In the above example, bundle group one contains nodes 1, 2 & 4. The PRL is set to two. Because the inline bundle doesn't count toward the PRL the shared bundle (node 4) is not removed in order the met the PRL and the bundle graph pre-check against the PRL and post check remains the same.

🚨 Test instructions

NA

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@parcel-benchmark
Copy link

parcel-benchmark commented Aug 15, 2023

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.42s +20.00ms
Cached 256.00ms -11.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 221.00ms -13.00ms 🚀
dist/legacy/index.b8ae99ba.css 94.00b +0.00b 228.00ms -21.00ms 🚀
dist/modern/index.31cedca9.css 94.00b +0.00b 228.00ms -21.00ms 🚀

React HackerNews ✅

Timings

Description Time Difference
Cold 3.99s -20.00ms
Cached 357.00ms -24.00ms 🚀

Cold Bundles

Bundle Size Difference Time Difference
dist/PermalinkedComment.b41e2791.js 4.07kb +0.00b 384.00ms +74.00ms ⚠️
dist/UserProfile.2a2fa310.js 1.51kb +0.00b 384.00ms +74.00ms ⚠️
dist/NotFound.13a965e5.js 399.00b +0.00b 384.00ms +74.00ms ⚠️
dist/logo.8dd07848.png 244.00b +0.00b 278.00ms +15.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/logo.8dd07848.png 244.00b +0.00b 259.00ms -32.00ms 🚀

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 33.54s -125.00ms
Cached 1.96s -22.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/editorView.35ac73e7.js 619.90kb +0.00b 11.75s -955.00ms 🚀
dist/refractor.c460668c.js 601.81kb +0.00b 9.79s -833.00ms 🚀
dist/popup.c282bed0.js 324.59kb +0.00b 9.79s -833.00ms 🚀
dist/EmojiPickerComponent.1a5571cb.js 189.81kb +0.00b 9.77s -835.00ms 🚀
dist/ConfigPanelFieldsLoader.d25d4efc.js 83.10kb +0.00b 9.77s -836.00ms 🚀
dist/mobile-upload.35a8a8fb.js 66.63kb +0.00b 4.39s -244.00ms 🚀
dist/esm.1c9ef78b.js 63.49kb +0.00b 9.79s -833.00ms 🚀
dist/component.bb2f7991.js 58.01kb +0.00b 4.36s -247.00ms 🚀
dist/esm.3fa8c7de.js 39.56kb +0.00b 9.79s -833.00ms 🚀
dist/Modal.ff929598.js 28.33kb +0.00b 4.36s -267.00ms 🚀
dist/smartMediaEditor.0fdaaac3.js 21.89kb +0.00b 9.79s -834.00ms 🚀
dist/esm.699bbabf.js 20.65kb +0.00b 9.79s -834.00ms 🚀
dist/component.1c22aee9.js 18.81kb +0.00b 4.37s -260.00ms 🚀
dist/js.324be058.js 17.34kb +0.00b 4.36s -251.00ms 🚀
dist/dropzone.7e088531.js 13.61kb +0.00b 9.79s -833.00ms 🚀
dist/dropzone.09d0b890.js 11.64kb +0.00b 9.79s -833.00ms 🚀
dist/Toolbar.7b6f497e.js 9.53kb +0.00b 9.79s -834.00ms 🚀
dist/clipboard.f5f3497c.js 8.07kb +0.00b 9.79s -833.00ms 🚀
dist/mobile-upload.8bd7d5f3.js 7.99kb +0.00b 4.36s -246.00ms 🚀
dist/mobile-upload.40a8f0fb.js 7.99kb +0.00b 9.79s -834.00ms 🚀
dist/index.runtime.50c92a63.js 7.42kb +0.00b 9.79s -834.00ms 🚀
dist/browser.333a8efe.js 7.33kb +0.00b 9.79s -833.00ms 🚀
dist/index.b16227d6.css 4.08kb +0.00b 9.80s -833.00ms 🚀
dist/Modal.232b8600.js 4.00kb +0.00b 4.36s -247.00ms 🚀
dist/component.b84d6109.js 3.35kb +0.00b 4.36s -247.00ms 🚀
dist/media-picker-analytics-error-boundary.418c2c46.js 3.32kb +0.00b 9.79s -833.00ms 🚀
dist/media-card-analytics-error-boundary.7d513b72.js 3.32kb +0.00b 9.79s -833.00ms 🚀
dist/png-chunks-extract.c54842d7.js 3.19kb +0.00b 4.36s -245.00ms 🚀
dist/ru.896915b9.js 2.94kb +0.00b 7.35s +2.00s ⚠️
dist/workerHasher.bfc999cd.js 1.69kb +0.00b 4.36s -245.00ms 🚀
dist/workerHasher.dd4d2a38.js 1.69kb +0.00b 9.79s -833.00ms 🚀
dist/workerHasher.eae92e5c.js 1.69kb +0.00b 9.79s -833.00ms 🚀
dist/workerHasher.cfe5994f.js 1.69kb +0.00b 9.79s -834.00ms 🚀
dist/16.87c743d1.js 1.48kb +0.00b 4.37s -259.00ms 🚀
dist/16.dd50aef4.js 1.41kb +0.00b 4.37s -260.00ms 🚀
dist/heading5.023a8f1f.js 1.36kb +0.00b 5.18s +357.00ms ⚠️
dist/16.9e7cc0d9.js 1.13kb +0.00b 4.37s -260.00ms 🚀
dist/16.8d078bd1.js 1.08kb +0.00b 4.37s -259.00ms 🚀
dist/16.bb53313d.js 1.08kb +0.00b 4.37s -260.00ms 🚀
dist/16.88e24f19.js 1.06kb +0.00b 4.37s -240.00ms 🚀
dist/16.db9c75f1.js 1.03kb +0.00b 4.39s -245.00ms 🚀
dist/16.c0880b62.js 992.00b +0.00b 4.37s -259.00ms 🚀
dist/16.99296be0.js 964.00b +0.00b 4.37s -259.00ms 🚀
dist/16.c16ee42d.js 957.00b +0.00b 4.37s -259.00ms 🚀
dist/16.26c3d518.js 912.00b +0.00b 4.37s -260.00ms 🚀
dist/16.f76b9cae.js 906.00b +0.00b 4.37s -260.00ms 🚀
dist/16.fb327623.js 906.00b +0.00b 4.37s -260.00ms 🚀
dist/16.f2056258.js 905.00b +0.00b 4.37s -260.00ms 🚀
dist/16.4e7dec68.js 904.00b +0.00b 4.37s -259.00ms 🚀
dist/16.400116d9.js 903.00b +0.00b 4.37s -239.00ms 🚀
dist/16.24326b68.js 855.00b +0.00b 4.37s -259.00ms 🚀
dist/16.0285f4b2.js 827.00b +0.00b 4.37s -259.00ms 🚀
dist/sk.101f1705.js 786.00b +0.00b 7.18s -548.00ms 🚀
dist/simpleHasher.2403fa32.js 719.00b +0.00b 4.36s -245.00ms 🚀
dist/simpleHasher.308c3a38.js 719.00b +0.00b 9.79s -833.00ms 🚀
dist/simpleHasher.f29b9a84.js 719.00b +0.00b 9.79s -833.00ms 🚀
dist/simpleHasher.d2c7eaf0.js 719.00b +0.00b 9.79s -834.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/ConfigPanelFieldsLoader.d25d4efc.js 83.10kb +0.00b 10.09s +939.00ms ⚠️
dist/codeViewerRenderer.f99075be.js 2.74kb +0.00b 7.30s -2.73s 🚀
dist/index.html 248.00b +0.00b 5.11s -2.08s 🚀

Three.js ✅

Timings

Description Time Difference
Cold 2.95s +67.00ms
Cached 314.00ms +10.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/Three.js 572.22kb +0.00b 951.00ms +52.00ms ⚠️

Click here to view a detailed benchmark overview.

packages/core/integration-tests/test/bundler.js Outdated Show resolved Hide resolved
packages/bundlers/default/src/DefaultBundler.js Outdated Show resolved Hide resolved
packages/bundlers/default/src/DefaultBundler.js Outdated Show resolved Hide resolved
packages/bundlers/default/src/DefaultBundler.js Outdated Show resolved Hide resolved
packages/bundlers/default/src/DefaultBundler.js Outdated Show resolved Hide resolved
@irismoini irismoini requested a review from AGawrys August 15, 2023 20:26
@irismoini irismoini force-pushed the imoini/P2X-1023-exclude-inline-assests-from-PRL branch from 97fc88b to fdc3a4e Compare August 17, 2023 17:35
@irismoini irismoini merged commit 5d54a4f into v2 Aug 17, 2023
16 checks passed
@irismoini irismoini deleted the imoini/P2X-1023-exclude-inline-assests-from-PRL branch August 17, 2023 18:58
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