Stefan Schimanski wrote:
Looking through the painting code... Is there a good reason that we
don't do partial redraws while scrolling?
Theoretically no. In practice, the way we do painting is inherited from
the multi-frontend approach. There are certainly things that can be
optimized.
I mean a lot of the screen
might be repaintable by just bitblt'ing the old image a bit upwards or
downwards. For the usual cursor movement this is not that important
because it is scrolled not so often (we might still get a speed up of
two because it's scrolled halfpagewise). But scrolling by sliding the
scrollbar or using the mouse wheel triggers many more redraw.
Instead of doing partial redraw, I would use a QPixmapCache to cache
word painting. The main problem in Mac is that Qt is damned slow at font
metrics calculation. And Qt needs to recalculate the font metrics for
each text painting. But caching small transparent pixmaps of painted
words inside QLPainter we can speedup painting tremendously.
I've played a bit with this approach some months ago and it is certainly
doable.
Abdel.
- Re: 1.5.0svn slow view updates Abdelrazak Younes
-