Parent
Part of #414
Problem
kSyntaxHighlightIsolateThreshold = 8192 is defined but never consulted. Every debounced edit sends full code + grammarJson + theme JSON through compute, so small buffers pay isolate overhead and large buffers resend grammar/theme repeatedly.
Evidence
- lib/core/editor/syntax_highlight_isolate.dart (const at top; highlightOffMainThread always compute)
- lib/core/editor/querya_highlight_controller.dart
Acceptance
- Buffers below threshold highlight inline (or cheaper path)
- Above threshold uses isolate; grammar/theme cached on worker when possible
- No typing jank regression on small SQL editors
Suggested fix
Branch on threshold; cache highlighter/theme on the worker isolate; avoid resending grammar every keystroke.
Reactions are currently unavailable
Parent
Part of #414
Problem
kSyntaxHighlightIsolateThreshold = 8192 is defined but never consulted. Every debounced edit sends full code + grammarJson + theme JSON through compute, so small buffers pay isolate overhead and large buffers resend grammar/theme repeatedly.
Evidence
Acceptance
Suggested fix
Branch on threshold; cache highlighter/theme on the worker isolate; avoid resending grammar every keystroke.