Skip to content

perf(workspace): offload massive grid selection statistics calculation to background compute #652

Description

@ZhuchkaTriplesix

Motivation & Problem

When a user selects a massive range in the Data Grid (e.g. 10,000+ cells via Ctrl+A or shift-selection), GridSelectionCalcEngine.compute performs string parsing, number normalization, variance calculation, and distinct set aggregation synchronously on the main thread for the DataGridCalcBar.

Proposed Solution

  1. In DataGridCalcBar / GridSelectionCalcEngine:
    • Introduce an adaptive calculation method (computeAdaptive) that runs locally on the main thread when values.length < 5000, and offloads to compute(GridSelectionCalcEngine.compute, values) when selecting larger cell ranges.
  2. Add unit tests for adaptive selection stats computation.

Acceptance Criteria

  • Large cell selection calculations (>5,000 cells) do not drop frames on the main UI thread.
  • Small selections continue to compute synchronously with zero latency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendTheme parser epic label: frontendperformanceTheme parser epic label: performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions