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
Suggested fix
Branch on threshold; cache highlighter/theme on the worker isolate; avoid resending grammar every keystroke.
Parent
Part of #414
Problem
kSyntaxHighlightIsolateThreshold = 8192is defined but never consulted. Every debounced edit sends fullcode+grammarJson+ theme JSON throughcompute, so small buffers pay isolate overhead and large buffers resend grammar/theme repeatedly.Evidence
lib/core/editor/syntax_highlight_isolate.dart(const at top;highlightOffMainThreadalwayscompute)lib/core/editor/querya_highlight_controller.dartAcceptance
Suggested fix
Branch on threshold; cache highlighter/theme on the worker isolate; avoid resending grammar every keystroke.