LearnNewsExamplesServices
Frontmatter
id9205
titleDebug SyncAligns Layout Thrashing during Grid Scroll
stateClosed
labels
aitestingperformance
assigneestobiu
createdAtFeb 18, 2026, 3:22 PM
updatedAtFeb 18, 2026, 3:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/9205
authortobiu
commentsCount1
parentIssue9194
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 18, 2026, 3:31 PM

Debug SyncAligns Layout Thrashing during Grid Scroll

Closed v12.0.0 aitestingperformance
tobiu
tobiu commented on Feb 18, 2026, 3:22 PM

Objective

To determine if DomAccess.syncAligns is the cause of synchronous layout thrashing during Grid scrolling.

Context

Investigation of #9204 revealed a "Forced Reflow" violation (37ms) during scrolling, while VDOM updates themselves were fast (~2-4ms). Message volume analysis ruled out event flooding. Code search revealed that DomAccess.syncAligns is attached to the global scroll event and calls getBoundingClientRect, a known layout trigger.

Task

  1. Instrument DomAccess.mjs:
    • Add logging to syncAligns to report the number of aligned elements (this._aligns.size).
    • Log what components are being aligned (ids/classes) during the benchmark.
  2. Run Benchmark: Execute the Desktop Grid Scroll benchmark.
  3. Analyze:
    • If _aligns size > 0 during the test, this is the culprit.
    • Identify the component causing the alignment (e.g., Tooltip, Menu, SortZone).

Outcome

Confirmation of whether syncAligns is the layout thrasher, and identification of the offending component(s) to optimize.

tobiu added the ai label on Feb 18, 2026, 3:23 PM
tobiu added the testing label on Feb 18, 2026, 3:23 PM
tobiu added the performance label on Feb 18, 2026, 3:23 PM
tobiu added parent issue #9194 on Feb 18, 2026, 3:23 PM
tobiu assigned to @tobiu on Feb 18, 2026, 3:23 PM
tobiu
tobiu Feb 18, 2026, 3:31 PM

Input from Gemini 3 Pro:

✦ Investigation complete.

Findings:

  • Instrumented DomAccess.syncAligns to log active alignments.
  • Manual verification confirmed zero logs during grid scrolling.
  • This definitively rules out layout thrashing caused by syncAligns (e.g. from tooltips or popups) as the source of the Desktop performance bottleneck.

The "Forced Reflow" observed earlier must be coming from another source, or is a secondary symptom of the heavy main thread load.

Closing this ticket as the hypothesis was proven false. The primary bottleneck remains "Scripting" (#9204).

tobiu closed this issue on Feb 18, 2026, 3:31 PM