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

ScopeHoistingPackager: Wrap assets when any ancestor is wrapped #7883

Merged
merged 8 commits into from
Apr 11, 2022

Conversation

wbinnssmith
Copy link
Contributor

Relying on DFS context is insufficient as it only considers the first ancestor's wrapped state. This performs a dfs downward from each initially wrapped root asset, skipping children as soon as it encounters a currently wrapped asset, ensuring that we don't visit any unnecessary assets further.

Test Plan: Added an integration test. yarn test

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/multiple-ancestors-wrap branch from dd7a39b to 344941e Compare March 31, 2022 22:42
@parcel-benchmark
Copy link

parcel-benchmark commented Mar 31, 2022

Benchmark Results

Kitchen Sink 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

React HackerNews ✅

Timings

Description Time Difference
Cold 9.75s +177.00ms
Cached 499.00ms +28.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/index.js 485.80kb +519.00b ⚠️ 5.20s +136.00ms

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 485.80kb +519.00b ⚠️ 5.54s +467.00ms ⚠️
dist/PermalinkedComment.46b19af5.js 4.21kb +0.00b 5.54s +466.00ms ⚠️
dist/UserProfile.f8cd7884.js 1.57kb +0.00b 5.54s +467.00ms ⚠️
dist/NotFound.960ab92b.js 429.00b +0.00b 5.54s +467.00ms ⚠️
dist/logo.c5bb83f1.png 246.00b +0.00b 4.71s -308.00ms 🚀

AtlasKit Editor 🚨

Timings

Description Time Difference
Cold FAILED -0.00ms
Cached FAILED -0.00ms

Cold Bundles

No bundles found, this is probably a failed build...

Cached Bundles

No bundles found, this is probably a failed build...

Three.js ✅

Timings

Description Time Difference
Cold 7.19s -164.00ms
Cached 295.00ms +1.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@AGawrys AGawrys self-requested a review April 11, 2022 17:28
@wbinnssmith wbinnssmith merged commit 2b0b677 into v2 Apr 11, 2022
@mischnic mischnic deleted the wbinnssmith/multiple-ancestors-wrap branch July 5, 2022 11:30
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.

5 participants