flutter performance_error ai_generated true

Performance: CustomPainter repaint triggered excessively

ID: flutter/custom-painter-performance

Also available as: JSON · Markdown
78%Fix Rate
82%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3 active

Root Cause

CustomPainter repainting too frequently.

generic

Workarounds

  1. 90% success Implement shouldRepaint() to compare old vs new delegate
  2. 88% success Use RepaintBoundary to isolate expensive paint operations

Dead Ends

Common approaches that don't work:

  1. Return false from shouldRepaint always 82% fail

    Canvas never updates

  2. Rebuild entire widget tree on paint 78% fail

    Performance worse