Re: performance of goocanvas



On Wed, 2013-11-20 at 09:52 +0900, D M German wrote:

To be honest, I am not sure. I have created a good test case.



http://turingmachine.org/~dmg/temp/test.xoj

It is a gzip XML file. You can inspect it with gunzip -c <file> 

Each stroke is a polygon. Most letters will be around dozens of strokes.

Open the file and make sure that you have xournal in continuous mode
(Menu: View/Continuous).

I suspect you can get xournal installed from your Linux
distribution. Try opening the file. it will be slow, but once open, the
scrolling is smooth. 

If I try to open it with the version that has gtk3 (it is also slow to
load, so be patient :) but then it is very slow to scroll. It slows when
it has to display a new page.

I am not saying it is not a bug in my code :) that I might have
introduced during porting, so I will also inspect the scroll event to
make sure that I am not doing anything to slow it down.

I don't think the problem is drawing. I put a "return;" statement at the
top of the GooCanvasPolyline's draw function so it didn't draw anything,
but it was just as slow!

I think the problem may be that you are sometimes changing items when
the canvas is scrolled, and this causes the canvas to have to
recalculate the bounds of lots of items, which is slow.

What changes are you making when the canvas is scrolled? Is there a way
to avoid them?

Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]