[Kstars-devel] Some research about drawing speed
Khudyakov Alexey
alexey.skladnoy at gmail.com
Fri Jun 19 18:33:31 CEST 2009
Oops finger slipped...
At some point I slow sky drawing really annoyed me. In development version
full sky redraw take ~1s. And I profiled code with valgrind. Here some results.
Profiling shown that ~75% of time is spent in QPainter::draw* routines. It's on
one hand is good result which means that our code is decently fast. On other
hand it means that there is no easy way to optimise it.
After some googling I found that Qt4.5 included new feature. It has different
paint engines. Native/raster/opengl. Both raster and opengl engines outperform
native. However there isn't much info about it so I can be mistaken at some
point.
Only infomative links I've found.
http://doc.trolltech.com/4.5/qpaintengine.html
Engine could be chosen with:
$ path/to/kstars -graphicssystem {raster,opengl}
With raster I've got approximately 5x speed increase and kstars became
responsive.
With opengl - immediate crash.
Another curious thing I've found. When Ctrl key pressed forceUpdate event in
SkyMap is somehow toggled. I believe it's a bug. Should investigate it
further.
--
Khudyakov Alexey
More information about the Kstars-devel
mailing list