Skip to content

improve batch rendering performance by moving VM blocks out of the DESTRYABLE_META - #21571

Open
NullVoxPopuli wants to merge 3 commits into
mainfrom
nvp/perf/destroyable-slot-widen
Open

improve batch rendering performance by moving VM blocks out of the DESTRYABLE_META#21571
NullVoxPopuli wants to merge 3 commits into
mainfrom
nvp/perf/destroyable-slot-widen

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

It's apparently faster to access a property on an object and do some checks, than it is to always ask a (weak)map for stuff

No downside.

@runspired knew about this perf optimization long ago: https://discord.com/channels/480462759797063690/1539315791088848936/1539319539295199242

so.. I'll be exploring where else we can do it in future PRs

image image

This was explored with AI over here: #21569

@NullVoxPopuli
NullVoxPopuli force-pushed the nvp/perf/destroyable-slot-widen branch from 1396440 to 71a716e Compare August 18, 2026 13:30
@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

📊 Size report

Tarball size1.2 MB1.2 MB

dist/dev   0.1%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@glimmer/destroyable/index.js 6.4 kB / 1.5 kB 16%↑7.5 kB / 15%↑1.7 kB
./packages/shared-chunks/api-{hash}.js 26.2 kB / 5.8 kB 0.4%↑26.3 kB / 0.7%↑5.9 kB
./packages/shared-chunks/destroyable-key-BsfVBM7f.js 524 B / 265 B
./packages/shared-chunks/reference-{hash}.js 4.9 kB / 1.3 kB 2%↑5 kB / 3%↑1.3 kB
./packages/shared-chunks/render-{hash}.js 55.8 kB / 12.1 kB 0.6%↑56.1 kB / 1%↑12.2 kB
Total (Includes all files) 2.1 MB / 491.8 kB 0.1%↑2.1 MB / 0.2%↑492.6 kB

dist/prod   0.1%↑

File Before (Size / Brotli) After (Size / Brotli)
./packages/@glimmer/destroyable/index.js 4 kB / 898 B 23%↑4.9 kB / 23%↑1.1 kB
./packages/shared-chunks/api-{hash}.js 25.7 kB / 5.7 kB 0.4%↑25.8 kB / 0.9%↑5.8 kB
./packages/shared-chunks/destroyable-key-BsfVBM7f.js 524 B / 265 B
./packages/shared-chunks/reference-{hash}.js 4.3 kB / 1.2 kB 2%↑4.4 kB / 3%↑1.2 kB
./packages/shared-chunks/render-{hash}.js 52 kB / 11.2 kB 0.7%↑52.4 kB / 1%↑11.3 kB
Total (Includes all files) 1.9 MB / 449.2 kB 0.1%↑1.9 MB / 0.2%↑450 kB

smoke-tests/v2-app-template/dist   0.1%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/api-{hash}.js 290.2 kB / 78 kB 0.1%↑290.6 kB / 0.08%↑78 kB
Total (Includes all files) 342.5 kB / 95 kB 0.1%↑342.9 kB / 0.1%↑95.1 kB

smoke-tests/v2-app-hello-world-template/dist   0.2%↑

File Before (Size / Brotli) After (Size / Brotli)
./assets/main-{hash}.js 132.1 kB / 36.9 kB 0.2%↑132.4 kB / 0.3%↑37 kB
Total (Includes all files) 132.4 kB / 37 kB 0.2%↑132.7 kB / 0.3%↑37.1 kB

🤖 This report was automatically generated by wyvox/pkg-size

@NullVoxPopuli
NullVoxPopuli force-pushed the nvp/perf/destroyable-slot-widen branch from 194dffb to b92b228 Compare August 18, 2026 15:01
@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

Results on a mac:
image

image

ef4
ef4 previously approved these changes Aug 18, 2026
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.

2 participants