[Kstars-devel] Note on drawing speed

Khudyakov Alexey alexey.skladnoy at gmail.com
Wed Mar 10 16:22:09 CET 2010


Hello

It's well known that drawing of sky map in kstars is way too slow. Recently I 
identified one of bottlenecks. At low zoom about a half of time is spent in 
drawing constellation boundaries and coordinate grid. Almost all that time is 
spent in QPaint::drawLine and number of calls is very big. 

I suspect that problem is that lines are divided in too many segments. 
I think best approach it to write generic function for drawing arcs on the 
sphere. Such function will use minimal number of line segments. Another 
possibility is to approximate arc on sphere with arc on plane.

It's not clear how such function could be implemented. I didn't do all the mah 
yet. 

Also I must note that this approach has one clear advantage: it becomes 
reasonable easy possible to draw coordinate grid which step adapts to field of 
view.

--
  Khudyakov Alexey


More information about the Kstars-devel mailing list