[Kstars-devel] Need help diagnosing KStars slowness

Jason Harris kstars at 30doradus.org
Wed Jun 7 06:02:05 CEST 2006


Hi James, and everyone,

I have also noticed that the delay is sometimes even longer than the Skymap 
timing results indicate.  I think what's happening is that the updating of 
object positions (which is invoked when toggling the View buttons) is also 
taking a long time.  I have attached two more patches, which will give us 
data about this.  The skymapevents2.diff patch assumes that you've already 
applied the skymapevents.diff patch from my previous message.

After applying the patches, you'll be able to invoke a "full update", which 
will recompute the positions of all objects and refresh the screen, by 
pressing the "X" key.  When I do it, I get numbers like this:

kstars: SkyMapComposite::update() took 1822 ms
kstars: SkyMapComposite::updatePlanets() took 1565 ms
kstars: SkyMapComposite::updateMoons() took 10 ms
kstars: SkyMapComposite::update() for Alt/Az took 60 ms
kstars: X: Full update took 3457 ms
kstars: Skymap draw took 1466 ms

So, indeed, the updating of positions takes more than twice as long as drawing 
to the screen.  Both SMC::update() and SMC::updatePlanets() seem to be the 
culprits.  I'll look into it, but I would be interested to see what numbers 
other people get, so please try the patches.

regards,
Jason

On Tuesday 06 June 2006 19:39, James Bowlin wrote:
> On Monday 05 June 2006 21:05, Jason Harris wrote:
> > For me, I get about 1.5 sec for a full draw, and 0.2 sec for a draw
> > while slewing (my CPU is amd64 2.4GHz).
>
> I was able to get the stars back by deleting both ~/.kde/share/apps/kstars/
> and ~/.kde/share/config/kstarsrc.
>
> With everything on the screen as per the default configuration, zoomed out
> so the entire (half) celestial sphere is visible a full draw takes over
> 6 seconds.  While slewing it takes about 0.9 seconds.  This is on a
> 1.6 GHz Pentium-4 Mobile.
>
> The toggle button for the solar system does not seem to work but most of
> the others do seem to work.
>
> One strange thing is that there is a significant lag between when I press
> a toggle button and when the screen is redrawn.  I realize that I will
> need to wait for the time it takes to do the screen redraw but the lag
> seems to be almost twice that long.
>
> For example, if I have most things turned off so a redraw takes about
> 3 seconds and I then toggle the horizon, I have to wait about 8 seconds
> before the screen changes.  During this time KStars (I presume) is using
> 100% of the CPU.  In the console window, KStars reports that the skymap
> draw took 2.8 seconds.  So it seems that something else is eating up
> even more CPU than drawing the skymap.
>
> Please let me know if there is any other information I can give you.

-- 
KStars: http://edu.kde.org/kstars
Community Forums: http://kstars.30doradus.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kstarsdata.diff
Type: text/x-diff
Size: 1797 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20060607/7c7af9ed/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skymapevents2.diff
Type: text/x-diff
Size: 1203 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20060607/7c7af9ed/attachment-0001.bin 


More information about the Kstars-devel mailing list