Skip to content

Optimize Store Streaming and Progressive Loading #9115

@tobiu

Description

@tobiu

Refactor Neo.data.Store and Neo.data.proxy.Stream to optimize progressive loading and prevent UI blocking.

Key Changes:

  1. Eliminate Duplicate Load Events: Remove manual load event firing in Store.onData. Rely on onCollectionMutate to trigger load events naturally when data is added, preventing double-firing for every chunk.
  2. Unblock UI during Streaming: Introduce await me.timeout(5) in the Stream proxy's read loop. This yields control to the App Worker's event loop, allowing it to process VDOM updates and other events while parsing a large stream.
  3. Track Streaming State: Introduce isStreaming flag on the Store (managed via the Proxy) to distinguish between intermediate progressive updates and the final load completion.
  4. Base Proxy Enhancement: Add store config to Neo.data.proxy.Base to give proxies direct access to their owner store.

Goal: Ensure smooth, progressive rendering for large datasets (e.g., DevIndex) without freezing the UI.

Metadata

Metadata

Assignees

Labels

coreCore framework functionalityperformancePerformance improvements and optimizations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions