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

Backing nodes #4569

Closed
wants to merge 1 commit into from
Closed

Backing nodes #4569

wants to merge 1 commit into from

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Nov 24, 2024

Due to the bad performance characteristics of #4567 I wanted to start out by creating a backing nodes branch. This moves all of the properties incrementally over to a new overarching structure, the first commits basically try to uphold our status quo and incrementally move us over to the new backing-node structure.

The goal here is to hold no more reference to the freshly produced vnode and store all of the render flags on internal rather than Component and vnode. This should enable us to make Component tree-shakeable as well as boost performance as we will have smaller GC's due to the small size of a vnode and its fleety nature. In the current Preact X we have long lived GC runs as the vnode structure is large and still replaced with every rerender.

Digging deeper through this, it feels like we should split up mount and patch as it complicates our diffing process not to do so. In the first render the internals vnode will be equal to the "new" vnode which means that we can hit bail cases in the patch-y mount diffing that we currently do. Will investigate deeper but it looks like we might need to take an initial perf hit when developing this, could very well be that the perf pentalty on the current PR is a booboo on my behalf.

Copy link

github-actions bot commented Nov 24, 2024

📊 Tachometer Benchmark Results

Summary

A summary of the benchmark results will show here once they finish.

Results

The full results of your benchmarks will show here once they finish.

tachometer-reporter-action v2 for CI

Copy link

github-actions bot commented Nov 24, 2024

Size Change: +1.09 kB (+1.8%)

Total Size: 61.9 kB

Filename Size Change
dist/preact.js 4.8 kB +187 B (+4.05%)
dist/preact.min.js 4.83 kB +180 B (+3.87%)
dist/preact.min.module.js 4.83 kB +184 B (+3.96%)
dist/preact.min.umd.js 4.85 kB +179 B (+3.83%)
dist/preact.module.js 4.82 kB +185 B (+3.99%)
dist/preact.umd.js 4.87 kB +176 B (+3.75%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.79 kB
compat/dist/compat.module.js 3.71 kB
compat/dist/compat.umd.js 3.84 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.module.js 3.82 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 973 B
jsx-runtime/dist/jsxRuntime.module.js 947 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

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.

1 participant