Skip to content

fix(grid): eliminate redundant debounce timer and duplicate validation in DataGridValuePanel #1431

Closed

Description

@ZhuchkaTriplesix

Summary

In lib/features/workspace/data_grid_value_panel.dart (lines 96–105):

if (oldWidget.cellValue != widget.cellValue) {
  _debounceTimer?.cancel();
  _initialDetectedLanguage = _detectLanguage(widget.cellValue);
  _preserveCompact = _isCompact(widget.cellValue);
  _controller.text = _formatInitialValue(widget.cellValue);
  _validateContent();
}

When _controller.text = ... is invoked, it synchronously calls _onTextChanged, which immediately schedules a 150 ms _debounceTimer to run _validateContent(). Right after setting text, didUpdateWidget runs _validateContent() synchronously, and 150 ms later the timer runs _validateContent() a second time.

When rapidly switching selected rows or cells in the grid, this spawns redundant timers and double-parses JSON/XML content.

Proposed Solution

Suppress or cancel the debounce timer during programmatic cellValue synchronization in didUpdateWidget, or guard _onTextChanged against programmatic updates.

Acceptance Criteria

  • Programmatic cell updates perform validation once without scheduling redundant debounce timers.
  • User typing in the value panel retains the 150 ms debounce behavior.

Activity

  1. added
    bugSomething isn't working
    performanceTheme parser epic label: performance
    data-gridInteractive data grid, cell editor, filtering, groupings
    P2Medium priority / Parity & Refactoring
    on Oct 11, 2026
  2. added a commit that references this issue on Oct 11, 2026
  3. ZhuchkaTriplesix commented on Oct 11, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed and verified in PR #1449.

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

    P2Medium priority / Parity & RefactoringbugSomething isn't workingdata-gridInteractive data grid, cell editor, filtering, groupingsperformanceTheme parser epic label: performance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions