Skip to content

perf(editor): eliminate full-string comparisons and redundant listeners in QueryaCodeEditor (#1352) - #1467

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1352-editor-controller-sync
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1352-editor-controller-sync

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1352

Summary

  • Avoid attaching text change listener on the controller in QueryaCodeEditor when onChanged is null.
  • Optimize _onTextChanged to use reference identity identical(currentText, _lastText) ((1)$) on cursor / selection changes without full-string comparison.
  • Use length differential currentText.length != _lastText.length ((1)$) on typing/deletions, eliminating repeated multi-kilobyte string comparison passes across entire documents.
  • Add dynamic listener re-attachment on onChanged updates in didUpdateWidget.
  • Add test coverage for listener omission and same-length text replacement.

@github-actions github-actions Bot added editor Code/SQL editor performance Theme parser epic label: performance core Core library logic and services P3 Low priority / Polish & Enhancements labels Oct 11, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 030091b into dev Oct 11, 2026
11 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1352-editor-controller-sync branch October 11, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core library logic and services editor Code/SQL editor P3 Low priority / Polish & Enhancements performance Theme parser epic label: performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant