plastic icon indicating copy to clipboard operation
plastic copied to clipboard

ImageView::draw Method Inefficiency

Open silverhadch opened this issue 1 year ago • 1 comments

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.

silverhadch avatar Oct 22 '24 19:10 silverhadch

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

Amjad50 avatar Oct 22 '24 23:10 Amjad50