Skip to content

perf: bound collection update and viewport work for large data sets #416

Description

@subinium

Priority: P2
Evidence: Source-supported workload investigation
Baseline: v0.23.0 source 37933f9, audited 2026-09-05. Native execution/compile probes used Rust 1.98.0 on aarch64 macOS unless explicitly stated otherwise.

Problem and Reproduction

push_item rebuilds cache-coupled views on every append; sequential loading can repeat whole-list work. Variable-height End navigation still advances top linearly despite prefix lookup support. Non-virtual lists/tables/palettes can prepare offscreen commands; table pagination and existing file-picker virtualization must be distinguished.

src/widgets/collections.rs:94 · src/widgets/collections.rs:354 · src/context/widgets_interactive/rich_markdown.rs:1374 · src/context/widgets_interactive/selection.rs:366

Scope

  • Measure10^3/10^4/10^5-item append/filter/navigation/render workloads at a fixed viewport.
  • Evaluate batch mutation/incremental search caches and direct prefix-based jumps.
  • Optimize offscreen preparation without removing supported full-list or pagination semantics.

Expected Effect

Keep large collections responsive with work tied to actual changes and visible rows where appropriate.

Acceptance Criteria

  • Compare push loop against set_items/batch alternatives and document the contract.
  • End/Home/filter jumps preserve selected-item and variable-height mappings.
  • Measure release latency, command counts and memory; do not claim all widgets are O(viewport) beforehand.
  • Keep already bounded VecDeque logs and file-picker virtualization; add only remaining gaps.
  • Follow the repository quality gates and the evidence rules in tracking: post-v0.23 correctness, resource efficiency and WASM completion #366; record actual results rather than treating a proposed test as passed.

Boundaries and Dependencies

Do not weaken cache coherence to obtain lower timings.

Related closed work: #345, #319. This is a scoped follow-up at the audit baseline, not a claim that every prior fix is absent.

Tracking: #366. This issue records unresolved work, not an implemented fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:widgets-interactiveInteractive widgets (list, table, etc.)enhancementNew feature or requestseverity:warningPerf or code smell; should fixtype:perfPerformance: allocations, syscalls, ms reduction

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions