-
-
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
Seems good overall. One question
exports: collect | ||
.exports | ||
.into_iter() | ||
.map( |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be better, but they all contain IdentId
(so (JsWord, SyntaxContext)
) and the letter prevents serialization.
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.
Ah... ok
This enables
Known limitations for now:
Hoist
visitor, 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-fns
andreact-use
now 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