LearnNewsExamplesServices
Frontmatter
id9556
titleExploration: Worker-Side Data Sanitization vs. Lazy Record Hydration
stateOpen
labels
help wanteddiscussionno auto closeaiarchitecturecore
assignees[]
createdAtMar 25, 2026, 9:47 PM
updatedAtMar 26, 2026, 4:19 PM
githubUrlhttps://github.com/neomjs/neo/issues/9556
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]

Exploration: Worker-Side Data Sanitization vs. Lazy Record Hydration

Openhelp wanteddiscussionno auto closeaiarchitecturecore
tobiu
tobiu commented on Mar 25, 2026, 9:47 PM

Goal

Investigate the architectural feasibility of moving data validation and sanitization into the Data Worker Pipeline.

Description

Currently, Neo.data.RecordFactory handles validation and type conversion during Record instantiation in the App Worker. While the Store's "Turbo Mode" (Lazy Hydration) defers this cost, performing these operations in the App Worker still consumes the main execution thread when data is eventually accessed.

Exploration Points:

  1. Thread-Agnostic Validation: Can we extract validation logic (maxLength, nullable, etc.) into a shared utility that the Data Worker can run on raw parsed objects?
  2. Pre-Sanitization: What are the performance trade-offs of "cleaning" raw data in the Data Worker before it crosses the worker boundary?
  3. Turbo Mode Impact: Does pre-sanitizing data in the Data Worker simplify or redundantize the "Soft Hydration" logic (resolveField) in Neo.data.Store?
  4. Error Reporting: How do we efficiently report validation failures for bulk datasets (e.g., 10k rows) back to the App Worker without bloating the IPC payload?

This is a research-first ticket to determine if a "Pre-Hydration" phase in the Data Worker is a viable architectural evolution.

tobiu assigned to @tobiu on Mar 25, 2026, 9:47 PM
tobiu added the discussion label on Mar 25, 2026, 9:47 PM
tobiu added the ai label on Mar 25, 2026, 9:47 PM
tobiu added the architecture label on Mar 25, 2026, 9:47 PM
tobiu added the core label on Mar 25, 2026, 9:48 PM
tobiu added the help wanted label on Mar 25, 2026, 9:50 PM
tobiu added the no auto close label on Mar 25, 2026, 9:50 PM
tobiu unassigned from @tobiu on Mar 26, 2026, 4:19 PM