[Qt-interest] Performance issue with QGraphicsScene::createItemGroup

luper rouch luper.rouch at gmail.com
Wed Jan 27 17:09:58 CET 2010


2010/1/27 luper rouch <luper.rouch at gmail.com>
>
> I'm using the Qt graphics API to display layers in some GIS software.
>
> Each layer is a group, containing graphic primitives. I have a
> performance issue when loading fairly large data sets, for example
> this is what happens when making a group composed of ~96k circular
> paths (points from a shapefile):
>
> http://f.imagehost.org/0751/callgrind-createItemGroup.png
>
> The QGraphicsScene::createItemGroup() call takes about 150 seconds to
> complete on my 2.4GHz core2, and it seems all this time is used in
> QGraphicsItemPrivate::updateEffectiveOpacity(), which itself consumes
> 37% of its time calling QGraphicsItem::flags() 4 /billion/ times (the
> data comes from a test script with no GUI, just a scene, not even tied
> to a view).
>
> All the rest is pretty much instantaneous (like creating the items,
> reading the file, etc...). I tried to disable the scene's index before
> creating the group with similar results.
>
> What could I do to improve performances in this case ?
>
> --
> Lup

For the records, this question has been answered here (upvote the
answerer if you're on SO, he deserves it :-) ) :

http://stackoverflow.com/questions/2144081/performance-issue-with-qgraphicsscenecreateitemgroup


--
Lup



More information about the Qt-interest-old mailing list