Skip to content

Runtime: make named property deletion proportional #522

Description

@chrisbbreuer

Parent: #493
Related: #480, #472, #521, #459

Defect

Object.deleteNamedDataOwnInternal reconstructs the complete shape, slot array, attributes, and surviving key list for every configurable named-property deletion. Deleting n distinct properties from one wide object repeatedly enumerates and rebuilds the shrinking object, producing superlinear CPU and extreme transient/arena memory growth.

A ReleaseFast 4,096-property setup witness was sampled after more than 110 seconds with a 3.3 GB physical footprint. Every sampled main-thread stack was still inside deleteNamedDataOwnInternal, dominated by repeated string equality, setOwnUnlocked, and full-object rebuild work. This was discovered while isolating #521; own-key enumeration is tracked there, while deletion/rebuild needs its own representation-level fix.

Required change

  • Add deterministic 1K/2K/4K delete and delete/re-add growth witnesses with exact survivor/order/descriptor checksums.
  • Design owned tombstones, slot indirection, or another proportional deletion representation that preserves hidden-class transition correctness, insertion order, accessor/data conversion, attributes, dense/sparse indices, and moving-GC relocation.
  • Bound compaction/rebuild work and historical capacity; allocation failure must leave the object exact and usable.
  • Preserve inline-cache invalidation and no-GIL property-lock synchronization.
  • Add ordinary/accessor/indexed, OOM, moving-GC, no-GIL, and TSan coverage.
  • Record exact-parent CPU, allocation, and memory evidence with no ordinary get/set regression.

No-workaround rules

No property-count limit, deletion refusal, dictionary-mode semantics shortcut, stale slot exposure, skipped descriptor/order behavior, global cache, or benchmark-specific path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceMeasured runtime, memory, scaling, or build performanceruntimeJavaScript runtime and builtin implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions