Skip to content

Enhance Stream Proxy with Adaptive Chunking for Faster TTFC #9123

@tobiu

Description

@tobiu

We are missing a point here: the vdom engine gets close to no work after the first 100 items. It needs to update the aria total row count, and the scrollbar height. Pretty much it.

To optimize the Time To First Content (TTFC), we should implement an "Adaptive Chunking" strategy in the Stream Proxy.

Proposal:
Add initialChunkSize and initialBurstCount configs to Neo.data.proxy.Stream.

  • initialChunkSize: Allows a smaller chunk size (e.g., 100) for the first few batches to render the visible viewport immediately.
  • initialBurstCount: Defines how many of these small chunks to send before switching to the larger chunkSize (e.g., 500) for efficient background loading.

Implementation Plan:

  1. src/data/proxy/Stream.mjs: Implement the adaptive logic in the read method.
  2. apps/devindex/store/Contributors.mjs: Update the store configuration to use initialChunkSize: 100 and initialBurstCount: 5.

This ensures the first paint happens ~5x faster (100 items vs 500), while maintaining high throughput for the remaining 50k+ records.

Metadata

Metadata

Assignees

Labels

aicoreCore framework functionalityenhancementNew feature or requestperformancePerformance improvements and optimizations

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions