You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 19c292d
Browse filesBrowse the repository at this point in the historyBrowse files
perf(fetchium): key each entity proxy into two WeakMaps instead of three (#91)
* perf(fetchium): key each entity proxy into one WeakMap instead of three
Every entity proxy was registered in PROXY_ID (its key), in
snapshotSources (its trap-free read record) and, through setScopeOwner,
in Signalium's owner map. Hermes walks every WeakMap entry slot on each
young GC and keeps those lists at their peak size, so each proxy cost
three slots for the session.
Store the key on the snapshot-source record and keep that record in
PROXY_ID, and register the scope owner on the first reactive method
access, the only path that resolves a scope through the proxy.
* fix(fetchium): register entity scope owners eagerly
`reactiveMethod(entity, fn)` defined outside the entity class resolves its
scope owner by the proxy's identity when called, so no trap can register it
lazily. Without a class method access first, it threw "Object has no scope
owner".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(fetchium): type PROXY_ID with the snapshot-source record
Drops the `snapshotSources` cast alias. With one map, a proxy missing from
it is never in it, so the hot-reload fallback no longer checks `PROXY_ID`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments