Skip to content

Conversation

@developit
Copy link
Member

This fixes preactjs/signals#726. The issue was that preact/debug calculates and assigns an _owner property (minified as __o) on every VNode that refers to its owning component, creating a cycle. Switching from a property a WeakMap is better for performance anyway, as it moves the cost into getComponentStack() which is a debugging helper that is only called in response to errors.

@github-actions
Copy link

📊 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

@github-actions
Copy link

Size Change: +11 B (+0.02%)

Total Size: 47.2 kB

Filename Size Change
debug/dist/debug.js 3.88 kB +2 B (+0.05%)
debug/dist/debug.mjs 3.89 kB +4 B (+0.1%)
debug/dist/debug.umd.js 3.97 kB +5 B (+0.13%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.92 kB
compat/dist/compat.mjs 3.84 kB
compat/dist/compat.umd.js 3.98 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.6 kB
dist/preact.mjs 4.61 kB
dist/preact.umd.js 4.67 kB
hooks/dist/hooks.js 1.55 kB
hooks/dist/hooks.mjs 1.58 kB
hooks/dist/hooks.umd.js 1.62 kB
jsx-runtime/dist/jsxRuntime.js 892 B
jsx-runtime/dist/jsxRuntime.mjs 861 B
jsx-runtime/dist/jsxRuntime.umd.js 966 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@coveralls
Copy link

Coverage Status

coverage: 99.537% (-0.002%) from 99.539%
when pulling 22864eb on fix/debug-owner-stack-memory-leak
into 7de6b9a on main.

Copy link
Member

@rschristian rschristian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linked signals issue can be reproduced in prod builds so unfortunately this won't be the cause. Good find anyhow though!

@JoviDeCroock JoviDeCroock merged commit 2e2b239 into main Jul 24, 2025
14 of 15 checks passed
@JoviDeCroock JoviDeCroock deleted the fix/debug-owner-stack-memory-leak branch July 24, 2025 19:30
@JoviDeCroock JoviDeCroock mentioned this pull request Aug 19, 2025
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.

@preact/signals/utils Show component has memory leak issue

5 participants