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(ui): flyweight Paint and zero-allocation line drawing in QueryaTreeIndentGuide #1526
In _QueryaTreeIndentGuidePainter.paint (lib/core/ui/querya_tree_indent_guide.dart), a new Paint() object is instantiated on every paint call, and canvas.drawLine(Offset(x, 0), Offset(x, size.height), paint) is invoked in a loop per depth level.
At 60 FPS during sidebar scroll (50 visible items * depth 3), this generates ~21,000 objects per second, causing GC pressure during scroll animations.
Solution
Use a reusable static/field Paint instance with updated color/strokeWidth.
Minimize Offset allocations (or cache point pairs where possible).
Benefits
Zero Paint object allocations during tree scrolling.
Smooth 60/120 FPS sidebar navigation even in deep database trees.
Activity