Qt-interest Archive, March 2007
QT 4.3 performance questions
Message 1 in thread
This may apply to 4.1/4.2 as well, however Im currently
using 4.3 snapshots. Ive been using QGraphicsView/QGraphicsScene
with only 600 or so items on the screen. Im now working with
as many as 80k items in a real life example and the slowdown
in performance is quite noticable. Something as simple as
pressing the mouse on an item to highlight it takes 3-4 seconds.
If I switch desktops and return to my app, it takes about 7
seconds to re-display the application viewport.
My platform is Linux Fedora 6, 2.8Ghz dual core, 2G ram
on a SATA drive.
One thing I found before I got to this point was that I was
calling _scene->update(sceneRect()) instead of just calling
it as _scene->update(). I had thought I needed a QRectF.
I tried using callgrind and kcachegrind to view the profile
results and it appears its spending all its time in the QT
libs. Im not that familiar with kcachegrind's usage, though
it appears self explanatory as far as whats being called most
and how often.
I searched around on qt forum for performance issues and
tried compiling with -O2 with no real change. I saw a couple
articles that seemed to suggest that OpenGL has much greater
performance than QGraphicsView/QGraphicsScene. Im not
sure if this is true or not? If so Im not sure how long it would
take to port everything to OpenGL or how hard it would be?
Im now recompiling the QT libs and turning off some things as
well as turning on -release to see how much difference this
may make.
Your experience in this area is appreciated,
thanks,
Jeff
--
[ signature omitted ]