LearnNewsExamplesServices
Frontmatter
id9382
titleE2E: Implement Dynamic RTT Measurement for VDOM Updates
stateClosed
labels
aiarchitectureperformance
assigneestobiu
createdAtMar 7, 2026, 10:13 PM
updatedAtMar 7, 2026, 10:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/9382
authortobiu
commentsCount2
parentIssue9380
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 7, 2026, 10:50 PM

E2E: Implement Dynamic RTT Measurement for VDOM Updates

Closed v12.1.0 aiarchitectureperformance
tobiu
tobiu commented on Mar 7, 2026, 10:13 PM

This ticket tracks the implementation of dynamic, real-time measurement of the VDOM pipeline's roundtrip time (RTT).

Goal: Instead of hardcoding a latency guess, we will use performance.now() to measure the exact time between a createViewData call and the moment the VDOM worker finishes applying the deltas.

Tasks:

  1. Hook into Neo.manager.VDomUpdate to measure the completion of a specific ownerId's update cycle.
  2. Maintain an Exponential Moving Average (EMA) of the last N roundtrips to smooth out frame spikes.
  3. Expose this dynamic expectedRtt so that ScrollManager can accurately calculate how far a scrollbar will travel during the next update cycle based on current velocity.

This is a sub-task of the Epic to resolve Grid Scroll Thrashing.

tobiu added the ai label on Mar 7, 2026, 10:13 PM
tobiu added the architecture label on Mar 7, 2026, 10:13 PM
tobiu added the performance label on Mar 7, 2026, 10:13 PM
tobiu added parent issue #9380 on Mar 7, 2026, 10:13 PM
tobiu cross-referenced by #9384 on Mar 7, 2026, 10:30 PM
tobiu referenced in commit abc0c61 - "perf: Add VDOM update performance hooks (#9382) on Mar 7, 2026, 10:39 PM
tobiu assigned to @tobiu on Mar 7, 2026, 10:39 PM
tobiu
tobiu Mar 7, 2026, 10:40 PM

Input from Gemini 3.1 Pro:

✦ I have implemented the RTT telemetry hooks.

Neo.mixin.VdomLifecycle now provides beforeExecuteVdomUpdate and afterExecuteVdomUpdate. These strictly measure the updateBatch worker call and the subsequent Main thread paint latency, intentionally excluding any App-worker queue wait time.

Neo.grid.Body implements these hooks to record the grid.scroll:<id> duration using the new Performance utility, but only when isScrolling is true to minimize noise.

The baseline metrics are now available for ScrollManager to query. We can close this ticket and move on to the predictive math in #9383.

tobiu referenced in commit b2e9ef3 - "perf: Add createViewData performance benchmark (#9382) on Mar 7, 2026, 10:49 PM
tobiu
tobiu Mar 7, 2026, 10:49 PM

Input from Gemini 3.1 Pro:

✦ I have added the second benchmark inside GridBody.mjs -> createViewData().

This will track grid.createViewData:<id>, explicitly measuring the synchronous execution time ($T_{gen}$) required to map the records to the row pool and calculate the new VDOM structure.

With both the synchronous generation time and the asynchronous cross-worker roundtrip ($T_{rtt}$) now actively monitored by Neo.util.Performance, we have all the data required for the predictive scroll math.

I will close this sub-ticket, and we can proceed to #9383 (Predictive Delta Injection).

tobiu closed this issue on Mar 7, 2026, 10:50 PM