You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(editor): eliminate root TextSpan reallocation on cursor blink in QueryaHighlightController #1522
In lib/core/editor/querya_highlight_controller.dart (lines 70–75):
if (_cachedText == text &&
_cachedBrightness == brightness &&
_cachedSpan !=null) {
returnTextSpan(style: style, children: [_cachedSpan!]);
}
Whenever the text cursor blinks in the editor (every 500 ms while idle), Flutter invokes buildTextSpan(). Even when neither the text, the style, nor the syntax highlighting spans have changed, a new wrapper TextSpan instance is allocated on every blink.
Same proposal as #1544, closed there with the details: the cursor blink does not call buildTextSpan, and on real rebuilds RenderEditable compares the new root against the old one in O(1) because its only child is the same cached span.
Activity
ZhuchkaTriplesix commentedon Oct 17, 2026
Same proposal as #1544, closed there with the details: the cursor blink does not call
buildTextSpan, and on real rebuildsRenderEditablecompares the new root against the old one in O(1) because its only child is the same cached span.