LearnNewsExamplesConnect
Frontmatter
assigneesneo-opus-grace
createdAtNov 14, 2026, 8:59 PM
updatedAtNov 15, 2026, 12:48 AM
githubUrlhttps://github.com/neomjs/neo/issues/20968
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[ ] 20974 A container''s bulkUpdateRecords writes one store batch
closedAtNov 15, 2026, 12:48 AM

A Turbo Mode store takes a batch of row edits as one change

Closed v14.0.0/archive-v14-0-0-chunk-2 enhancementaiperformancecoregrid
neo-opus-grace
neo-opus-grace commented on Nov 14, 2026, 8:59 PM

Context

A live grid over a large Turbo Mode store (autoInitRecords: false) is fed by a producer that edits many rows per tick. Today every edit goes through a record. Store#get(key) hydrates the raw row (src/data/Store.mjs:876–888), and record.set() fires recordChange for that row. The store re-applies filters and sorters per record (onRecordChange, :1658), and the grid's Body handles each event on its own (src/grid/Body.mjs:644–645).

So a producer that edits N rows per tick pays N events and N hydrations per tick. The records stay for the session: touching every row of a 100,000-row store hydrates all of them.

The Problem

Neither cost buys anything when the edits land together. A grid renders only its visible rows, a few dozen. Turbo Mode exists so that raw rows stay raw until something needs a record, and per-row edits defeat it.

The Architectural Reality

  • Turbo Mode: Neo.data.Store keeps raw objects and sorts and filters them (Store.mjs:34–65). get() and getAt() hydrate (:876–897).
  • onRecordChange (:1658) re-filters and re-sorts per changed record before it fires recordChange.
  • A record can change silently (setSilent, src/data/RecordFactory.mjs), which fires nothing.
  • Neo.grid.Body follows load and recordChange (Body.mjs:644–645). Its createViewData(false, true) refreshes the visible rows even when record identity is stable. onStoreLoad (:1570) wraps that call but also scrolls the view to the top 50 ms later.
  • Prior art (March 2026): a silent update of mounted records left stale rows, because nothing told the grid to refresh. A batch must always end in one refresh.
  • Design authority: n/a: this adds a path and calls no existing behavior wrong.

The Fix

  1. Neo.data.Store takes a batch of row edits, [{key, values}]; the method name is the implementer's.
    • Raw rows are written in place, without hydrating them.
    • Rows that are already records adopt their values together (RecordFactory#applyPreparedFields) and publish recordChange with isBatch: true. Records have observers (the grid's AnimatedChange column, grid.View, record observers), and a record written silently is the stale-row class above. Refined at implementation, PR #20975; the ticket first said "updated silently".
    • Filters and sorters are reapplied once.
    • One batch event names the changed keys.
  2. Neo.grid.Body follows that event with a handler that calls createViewData(false, true). The visible rows re-render once, without onStoreLoad's scroll to the top.
  3. A subclass can extend the batch. A grouping store, for example, applies each row's contribution and flushes its groups once.

Contract Ledger

Target surface Source of authority Proposed behaviour Fallback / edge Docs Evidence
Neo.data.Store batch edit (new) This ticket Writes raw rows in place; hydrated records adopt their values together and publish recordChange with isBatch; reapplies filters and sorters once; fires one batch event An unknown key is skipped and reported; an empty batch fires nothing Store JSDoc Unit
Neo.grid.Body batch handler (new) createViewData Re-renders the visible rows once per batch and keeps the scroll position — Body JSDoc Unit and e2e
recordChange (existing) onRecordChange Unchanged for single edits; a batch fires it only for rows that already are records, with isBatch: true, never for raw rows — Store JSDoc Unit

Acceptance Criteria

  • A 1,000-row batch on a Turbo Mode store fires one batch event and no recordChange (unit).
  • The batch hydrates no row that was not already a record (unit: hydration count before and after).
  • Already-hydrated rows carry the new values, and a filter or sorter the batch affects is applied once (unit).
  • A grid over the store shows the changed visible rows after one batch, and its scroll position stays (e2e).
  • Existing store and grid specs stay green.

Out of Scope

Changing how a single record.set() behaves; server-side batching; what a subclass does with its own derived state; the containers' bulkUpdateRecords (#20974).

Related

#20928 (canonical keys at the Store boundary; the batch's keys go through it) · #20185 (100,000 rows in a browser grid) · #20974 (the containers' bulkUpdateRecords moves onto the batch)

Ownership: self-assigned (Grace).

Live latest-open + closed sweep: checked latest 20 open (52 open, red band; no owning epic for store write paths) + closed search ("store batch update records one event Turbo": #18269 read, unrelated) and open search ("batch update records store event": #20185, #20498, both unrelated) at 2026-11-14T19:58Z; A2A recent claims: none on Store write paths; Memory Core problem-noun search: the March 2026 Turbo Mode and stale-row design threads, cited above; own assignments (#20964, #20952, #20911, #20884, #20790) do not overlap. No equivalent found.

Retrieval Hint: "Turbo Mode store batch row edits one event no hydration grid createViewData refresh"

tobiu referenced in commit 8c42dc1 - "feat(data): a Turbo Mode store takes a batch of row edits as one change (#20968) (#20975) on Nov 15, 2026, 12:48 AM
tobiu closed this issue on Nov 15, 2026, 12:48 AM