Register symbols even without scopehoisting#7222
Conversation
|
This pull request has been linked to and will mark 1 task as "Done" when merged:
|
16d9665 to
e30ea1a
Compare
Benchmark ResultsKitchen Sink ✅
Timings
Cold BundlesNo bundle changes detected. Cached Bundles
React HackerNews ✅
Timings
Cold Bundles
Cached Bundles
AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
1c6de95 to
460d0ee
Compare
| includeNodeModules: { | ||
| '@parcel/transformer-js': true, | ||
| } else { | ||
| if (symbol_result) { |
There was a problem hiding this comment.
Is the following duplicated? Should we combine hoist_result and symbol_result somehow?
|
Would be great to test this in a large app too. cc @lettertwo @thebriando @AGawrys @gorakong |
460d0ee to
0a38600
Compare
devongovett
left a comment
There was a problem hiding this comment.
Seems good overall. One question
| exports: collect | ||
| .exports | ||
| .into_iter() | ||
| .map( |
There was a problem hiding this comment.
What's the reason to map these to a different struct with (almost) the same shape? Should we just expose the original? The less copying the better...
There was a problem hiding this comment.
That would be better, but they all contain IdentId (so (JsWord, SyntaxContext)) and the letter prevents serialization.
This enables
Known limitations for now:
Hoistvisitor, notCollect)Close T-733
Testing an app in dev/serve mode with
import { Provider, defaultTheme, Button } from "@adobe/react-spectrum":(so before, every component was transformed and bundled. now it's only the ones that are actually imported)
IIRC in #5528, the performance improvement more significant because the JS transformer pipeline was slower.
For https://github.com/mischnic/parcel-plugin-browser, many functions in
date-fnsandreact-usenow are skipped. The dev bundle went from 1.92mb to 1.31mb, the sourcemap from 3.04mb to 1.96mb. Cold startup into dev goes from 2.2s to 1.8s