Re: performance of goocanvas



Damon,

so that's where we got to with the foocanvas....we didn't create a custom item but in effect we did have one as we used a group parent and did all our drawing within it's space....

Interesting really that every now then a need pops up for a really fast 2D canvas that deals with large numbers of lines/boxes etc...not an easy problem to crack and have a good interface which is I guess why one doesn't really exist.

Ed



On Thu, 21 Nov 2013, Damon Chaplin wrote:

On Wed, 2013-11-20 at 22:46 +0900, D M German wrote:
Ed, Damon,

I really want to thank you both. I was able to find the reason for the
performance hit. As you indicated, we were "moving" items to the same
location where they were _for the entire document_. I have found some
redundancy in some operations during scrolling (and probably in other
places too) that I'll remove.

I think your test file created about 330,000 GooCanvasPolyline items,
which is a bit too much really!

Ideally I think you should use custom canvas items for your stroke
items, to handle all the segments in one canvas item. You can optimize
it to calculate the bounds quickly, and you can avoid using object
properties which are pretty slow. The file will load a lot quicker that
way.


The test file with the handwriting and sketches looks cool! Do you use a
graphics tablet to do that?

Damon


_______________________________________________
goocanvas-list mailing list
goocanvas-list gnome org
https://mail.gnome.org/mailman/listinfo/goocanvas-list


--
 ------------------------------------------------------------------------
| Ed Griffiths, Acedb/ZMap development, Informatics Group,               |
|  The Morgan Building, Sanger Institute, Wellcome Trust Genome Campus   |
|  Hinxton, Cambridge CB10 1HH                                           |
|                                                                        |
| email: edgrif sanger ac uk  Tel: +44-1223-496844  Fax: +44-1223-494919 |
 ------------------------------------------------------------------------


--
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.

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