[Kstars-devel] KStars idling CPU usage

Jasem Mutlaq mutlaqja at ikarustech.com
Tue May 3 10:46:56 UTC 2016


Ok I found the problem, it was a timer in SkyMap that is connected to
update() slot. The timer fires every 30 milliseconds which causes a full
repaint. I don't know why it was added there, if anyone knows the reason
please let me!

For now, I disabled the timer and KStars barely register any CPU usage (3%
or less) while fully active (but without pan/zoom/scroll).

Regards,
Jasem


On Tue, May 3, 2016 at 1:27 PM, Jasem Mutlaq <mutlaqja at ikarustech.com>
wrote:

> Ok, it seems the SkyMapQDraw::paintEvent(..) is being called too many
> times. I tried to debug and find out why it is being fired too many times
> but the traceback was not very helpful. Here it is:
>
> https://paste.kde.org/pfszgabwk
>
> Perhaps someone can shed some light on the traceback?
>
> Regards,
> Jasem
>
>
> On Tue, May 3, 2016 at 12:40 PM, Jasem Mutlaq <mutlaqja at ikarustech.com>
> wrote:
>
>> I'm getting 9%-11% while paused. I disabled _everything_ including info
>> boxes and it's still 9%. Needs to investigate further.
>>
>> Regards,
>> Jasem
>>
>>
>> On Tue, May 3, 2016 at 11:39 AM, Akarsh Simha <akarshsimha at gmail.com>
>> wrote:
>>
>>> KStars consumes 10% of my CPU when idling (clock stopped, nothing
>>> happening)
>>>
>>> The reason is, despite the stoppage of the clock and the complete lack
>>> of events (no mouse clicks; no mouse moves even!) the paintEvent()
>>> seems to be called and repainting at least overlays and infoboxes
>>> continuously.
>>>
>>> I'm attaching the output of callgrind. SkyMapQDraw::paintEvent(), and
>>> the resulting InfoBoxWidget::paintEvent() and FOV::draw() seem to be
>>> some of the main contributors.
>>>
>>> Does anyone have any advice on how we might be able to optimize this
>>> performance?
>>>
>>> Note: callgrind machinery was on only during idling.
>>>
>>> Regards
>>> Akarsh
>>>
>>> _______________________________________________
>>> Kstars-devel mailing list
>>> Kstars-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/kstars-devel
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Jasem Mutlaq
>>
>>
>
>
> --
> Best Regards,
> Jasem Mutlaq
>
>


-- 
Best Regards,
Jasem Mutlaq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20160503/61eab559/attachment.html>


More information about the Kstars-devel mailing list