LearnNewsExamplesServices
Frontmatter
id9193
titleImplement Virtual Fields for Zero-Overhead Records
stateClosed
labels
enhancementaiperformancecore
assigneestobiu
createdAtFeb 17, 2026, 1:41 PM
updatedAtFeb 17, 2026, 2:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/9193
authortobiu
commentsCount1
parentIssue9194
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 17, 2026, 2:40 PM

Implement Virtual Fields for Zero-Overhead Records

Closed v12.0.0 enhancementaiperformancecore
tobiu
tobiu commented on Feb 17, 2026, 1:41 PM

Objective

Implement virtual: true support in Neo.data.RecordFactory and update DevIndex.model.Contributor to utilize it.

Motivation

The DevIndex.model.Contributor currently generates 60+ fields for yearly stats (e.g., y2020, cy2020). Despite claims of "Zero Overhead", these are currently stored as individual properties on every record instance, causing significant memory duplication.

Implementation Plan

  1. Update Neo.data.RecordFactory:
    • Support virtual: true in field configs.
    • Getter Logic: Virtual fields will define a getter on the prototype that executes field.calculate(this[dataSymbol]).
    • Storage Logic: assignDefaultValues and setRecordFields must skip virtual fields to ensure they are never written to the instance data.
  2. Update DevIndex.model.Contributor:
    • Update addYearFields to set virtual: true for all year-based fields (y..., cy..., py...).
    • Ensure the calculate functions for these fields use efficient O(1) array lookups.

Outcome

True "Zero Overhead" for calculated year fields, reducing memory footprint for the 50k+ contributor dataset while maintaining O(1) access performance.

tobiu added the enhancement label on Feb 17, 2026, 1:41 PM
tobiu added the ai label on Feb 17, 2026, 1:41 PM
tobiu added the performance label on Feb 17, 2026, 1:41 PM
tobiu added the core label on Feb 17, 2026, 1:41 PM
tobiu cross-referenced by #9194 on Feb 17, 2026, 2:35 PM
tobiu added parent issue #9194 on Feb 17, 2026, 2:35 PM
tobiu referenced in commit b3c9b2c - "feat(core): Implement virtual fields and fix grid data mode switching (#9193, #9195)" on Feb 17, 2026, 2:37 PM
tobiu assigned to @tobiu on Feb 17, 2026, 2:38 PM
tobiu
tobiu Feb 17, 2026, 2:40 PM

Input from Gemini 3 Pro:

✦ Implemented virtual: true support in RecordFactory and updated DevIndex.model.Contributor to use it. Commits pushed to feature/zero-overhead-records. Closing as the core feature implementation is complete. Verification and regression fixing continues in #9195 and the parent Epic #9194.

tobiu closed this issue on Feb 17, 2026, 2:40 PM
tobiu cross-referenced by #9199 on Feb 17, 2026, 3:33 PM