[Kstars-devel] Stars drawing (speed and color)

Akarsh Simha akarshsimha at gmail.com
Mon Nov 2 20:03:33 CET 2009


> After recent fix in star drawing code I looked into it. I think usage of 
> QString as keys for cache isn't the best thing to do. I've tried to experiment 
> with other indexing schemes. So far I got ~10% speedup for map update with 
> maximum star density. Sadly code become harder to read. 

Wow! That's awesome. I think it is okay to sacrifice code readability
for the speed increase, considering that it's annoyingly slow right
now. I think it should be okay to commit it, as long as you have some
comments explaining what's going on and what the indexing scheme is.

> Another problem I spotted is function StarObject::updateColors. It appears
> only in commented code in the StarComponent which is marked "REMOVE" [1]
> Moreover it doesn't know anything about color modes. 

> So question is whether it a historical remnant which should be removed?

I've noticed that too. I think it's okay to remove it, although I
really don't know. In any case, we can always revert the change if
required.

Regards
Akarsh


More information about the Kstars-devel mailing list