-
Notifications
You must be signed in to change notification settings - Fork 189
NVP's Quest Issue for Investigating Performance #1605
Description
Original Issue: #1590
As a part of this issue, it was reported that, in consuming ember.js apps, the vendor.js (where the VM lives), grew by ~ 50KB.
See: emberjs/ember.js#20628
Suspicions to investigate
-
we need embroider and auto-import to use the real@glimmer/*dependencies and not theember-source/dist/dependenciesstuff- embroider already supports handling export conditions
- it would likely be too accidentally disruptive to switch to using real glimmer packages in a patch release
- ember-source's deps should instead use the correct glimmer (and we wshould confirm this)
- debug code is ending up in production (even in 0.84.3)
- if any debug things that weren't present in 0.84.3 should be changed to LOCAL_DEBUG
- are there any DEBUG things that are not for ember-debug?
- dead code elimination of the GlimmerVM
- all "checks" code should not make it to production builds
- All the
@glimmer/debugstack-checks are in the prod build
This is most of what was added post-0.84.3 -- making debugging experience better / making working in the VM easier about what's going on.
- All the
- all "checks" code should not make it to production builds
- are there possibly duplicate modules between the packages?
- destruction, while async, is autotracked -- it doesn't need to be autotracked -- can we remove that?
- iteration changes in 64eb186
Things that don't work
- explicit / strict terser settings from the end-consumer
No change in perf
- Removing the dynamic checker
- https://github.com/glimmerjs/glimmer-vm/pull/1603/files
- This is surprising to me, but does demonstrate that the JS engines are doing good work
Things that have a small improvement
- about 6% improvement
- Explore performance 3 #1598
- However, this begs the question if our CI's performance benchmark is using development or production
- 2024-09-06: the benchmark in CI does use the prod build
- about a 1% improvement
- Explore Performance 2 #1597
- This implies that single-use function inlining is not happening in consuming projects
Needs further exploration
-
Use terser in the development -- shrinks the build in dev by 3kb
-
More aggressive build / rollup changes
Dev shrinks by ~ 17KB, Prod shrinks by ~ 7KB -
Using the production assets as the development assets
Explore performance 4 - don't use development assets #1599
Notes
Which packages are in ember-source?
| ember-source @ v5.4 | ember-source @ 6 alpha |
|---|---|
|
@glimmer/destroyable |
@glimmer/debug |