plastic
plastic copied to clipboard
ImageView::draw Method Inefficiency
The ImageView::draw method uses a nested loop that calls painter.get_point and painter.paint for each pixel. This could be inefficient for larger images, affecting performance.
Consider buffering the image or optimizing the draw logic by reducing the number of calls inside the loop.
The Painter API provided by the Canvas in ratatui only give you this option, draw each pixel.
A possible improvement would be to ignore Canvas and implement our own Widget