Benjamin K. Stuhl wrote:

> Longer term, having a more intelligent update model would be valuable for
> multiple reasons. I've had occasion recently to ask Veusz to plot several
> hundred thousand points, and while it can do so, it's still pretty slow,
> at least with antialiasing turned on. One way to speed things up a lot
> would be to change the rendering system so that each widget is its own
> layer, which is only updated on demand, and then the drawing code simply
> composites the layers together. Right now, changing an axis label also
> prompts a redraw of every curve; caching layers would circumvent this.
> This might not be _too_ hard to implement naively: each widget redraws its
> layer whenever it settings are changed, while the plotwindow give the
> widgets new layers whenever the zoom is changed. Of course, decent export
> still wants all the drawing to happen directly, rather than through a
> series of composited layers. (Though that in turn has the problem that my
> printer choked on the ~30 MB of postscript that the print driver produced,
> so...)

Seems a good goal. Each widget would need to know its dependencies much 
better to know when to be updated. Maybe it would be possible to do 
rendering in multiple threads if Qt allows it, and the widgets were 
independent.

I've thought about whether it is possible to offload rendering to a non-UI 
thread. For the rendering thread to get a consistent view, we'd need to 
either "snapshot" the document before rendering (maybe some sort of clever 
copy on write scheme could be used for modifications), copy the document 
before rendering (probably slow), or batch modifications until rendering has 
finished (difficult to keep the UI showing the latest version).

A quick hack we could do currently, is for xy widgets to turn off 
antialiasing for themselves when plotting to the screen with over N points.

Jeremy



Jeremy



_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à