Asger Ottar Alstrup wrote:
Jean-Marc Lasgouttes wrote:
I see. Isn't there some performance price?

Yes, but it is not noticeable in our testing. After all, we only paint two extra paragraphs.

I guess this is not something I can consider for 1.4.

Sure it is. Without, the coord cache is full of crap, and that causes assertions and crashes.

[Smarter redraw]
Are there plans to implement that for 1.5?

We have looked a lot on performance work for 1.5, we have done a lot of profiling, but there are no easy ways out.

Did you investigate if the emission Buffer::changed() instead of direct WorkArea::redraw call was the real culprit of Lars reported typing slowness?


The best bet is André's patch which will avoid an extra copy of the complete workarea pixmap. That should help a lot, especially on windows.

Interesting.


Other than that, we strongly suggest to wait until 1.6 for this work, because it will require time to stabilize. The reasoning is this: 1.4 is dead slow, 1.5 can be as well.

Ideas for doing less drawing include:

- Reintroduce the "draw only this paragraph" optimisation from the old days. This is a little complicated, because that means we have to only clear out part of the coord cache, and then rebuild just that part.

- Add a caching layer in the painter. Instead of drawing, collect all drawing requests in a data-structure. The first time, just draw on the screen from this data structure. Then remember the data-structure which illustrates what is on the screen. When the next redraw comes, collect all the drawing requests in a new instance of the data structure. Then start comparing from the start and end of the old and the new datastructures to find the middle part which is different. This will correspond to the part of the screen which will need to be updated. Then do just those paints. Extend the middle part until you get background fill requests, because then we now the drawing requests are selfcontained.

This was exactly what I was investigation some months ago. But then why not going to QPicture directly? This will need some changes to the core but I really think that's the way to go.

Abdel.

Reply via email to