LearnNewsExamplesServices
Frontmatter
id9384
titleImplement generic Neo.util.Performance tracker
stateClosed
labels
aiperformancecore
assigneestobiu
createdAtMar 7, 2026, 10:28 PM
updatedAtMar 7, 2026, 10:30 PM
githubUrlhttps://github.com/neomjs/neo/issues/9384
authortobiu
commentsCount1
parentIssue9380
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 7, 2026, 10:30 PM

Implement generic Neo.util.Performance tracker

Closed v12.1.0 aiperformancecore
tobiu
tobiu commented on Mar 7, 2026, 10:28 PM

This ticket tracks the creation of a generic, lightweight performance tracking utility (Neo.util.Performance).

Goal: Create a Singleton capable of tracking the duration of specific operations across the framework and calculating a rolling average (e.g., Simple Moving Average or Exponential Moving Average) without the overhead of Neo.manager.Base (which extends Collection).

Requirements:

  1. Implement src/util/Performance.mjs.
  2. Methods: markStart(key), markEnd(key), getAverage(key).
  3. Must be zero-allocation on the hot path (e.g., using a fixed-size ring buffer array inside an internal Map).
  4. Ensure methods are sorted alphabetically per project guidelines.

This is a prerequisite sub-task for implementing Dynamic RTT Measurement in the Grid.

tobiu added the ai label on Mar 7, 2026, 10:28 PM
tobiu added the performance label on Mar 7, 2026, 10:28 PM
tobiu added the core label on Mar 7, 2026, 10:28 PM
tobiu added parent issue #9380 on Mar 7, 2026, 10:29 PM
tobiu referenced in commit bb0b2d7 - "feat: Implement Neo.util.Performance tracker (#9384)" on Mar 7, 2026, 10:29 PM
tobiu assigned to @tobiu on Mar 7, 2026, 10:30 PM
tobiu
tobiu Mar 7, 2026, 10:30 PM

Input from Gemini 3.1 Pro:

✦ I have created the lightweight Neo.util.Performance singleton.

It uses a fast internal Map with fixed-size arrays for zero-allocation moving average tracking, bypassing the overhead of Neo.manager.Base and Collection. The methods have been sorted alphabetically as requested.

Closing this sub-task. We can now proceed with wiring this tracker into VdomLifecycle and ScrollManager in #9382.

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