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
enhance(normalizr): Lazy-clone entity tables to fix getNewEntities deopt (#3884)
getNewEntities eagerly cloned entity and meta table POJOs on first
access per key, causing a Maglev bailout ("Insufficient type feedback
for generic named access") because this.entities lacked stable type
feedback at optimization time.
Move the clone to setEntity (lazy, on first write per entity type) so
getNewEntities stays a pure Map operation that Maglev can optimize and
keep optimized. Also extract MetaEntry type alias to reduce repetition.
Made-with: Cursor
Move entity table POJO clone from getNewEntities to setEntity
6
+
7
+
Lazy-clone entity and meta tables on first write per entity type instead of eagerly in getNewEntities. This keeps getNewEntities as a pure Map operation, eliminating its V8 Maglev bailout ("Insufficient type feedback for generic named access" on `this.entities`).
0 commit comments