Kodi Community Forum

Full Version: High CPU only when on Movies or TV item of home menu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
It's not unusual (on the Pi) to see both blue (selected) text and white (unselected) text both scrolling together when an item is selected and the text is sufficiently long enough to cause scrolling. Maybe it's associated with what you are seeing above.
(2013-08-19, 12:25)popcornmix Wrote: [ -> ]I've had a look to see if this issue has an easy fix:
http://forum.xbmc.org/showthread.php?tid...pid1344888

Basically if a GUIListLabel has ever been focused and started scrolling, it continues to trigger dirty rectangle updates when un-focused and no longer scrolling.

Good debug work Smile

As I found in my previous post, if I scroll through Recently Added until the previously scrolling title (and it's lingering dirty rectangle) go off screen, the CPU returns to normal usage.
first, hello there.
popcornmix, you can test this:
void CGUIListLabel:Tonguerocess(unsigned int currentTime, CDirtyRegionList &dirtyregions)
{
- if (m_label.Process(currentTime))
+ if (m_label.Process(currentTime) && HasFocus())
MarkDirtyRegion();

CGUIControl:Tonguerocess(currentTime, dirtyregions);
}

however i do not thing that this is correct fix. i thing this only hides actual and more serious bug. i do not know where else this will reflect.
also in CGUIControlGroup:Tonguerocess i see a lot of unusual things, i believe they are here because of same or similar bug.
in CGUILabel:Tonguerocess ( m_label in code above ) i see m_scrolling is true for recently added items. combining this with long text, ie overFlows, that invalidates region without actual need.

that is at first ( and fast ) look. hope this will give some idea to someone.
(2013-08-19, 20:33)stupid-boy Wrote: [ -> ]popcornmix, you can test this:

Tested, but no benefit. Once a GUIListLabel has scrolled, the CPU remains high even when focus is removed.
You need to remove the "recently added movies" from the screen before CPU returns to normal.
strange, here it works. may be because i have applied all my PRs, who knows.
i test it on my win laptop, and i have more than one 'recently added'. win or RPI, must not be a difference.
(2013-08-19, 21:01)stupid-boy Wrote: [ -> ]strange, here it works. may be because i have applied all my PRs, who knows.
i test it on my win laptop, and i have more than one 'recently added'. win or RPI, must not be a difference.

I've pulled in #3114 and #3115 (already had the accepted one), and it now works. The cpu drops down when scrolling text is not focused.
Looks promising.
you are welcome Wink
but i suspect really fat bug here.
I can confirm the patch in post #48 does reduce CPU load in the Movies menu with the latest openelec-3.2 git build (this already includes PR 3114 and 3115) - many thanks stupid-boy.

Now, if only we could stop the network hammering... Smile
can someone perform regression test on this?
i am afraid it can reflect negatively on other place.
thanks in advice.
(2013-08-20, 06:17)MilhouseVH Wrote: [ -> ]Now, if only we could stop the network hammering... Smile

if you didn't noticed already, recently there is 'weather.addon' hammering added too. i thing it is part of confluence skin.
(2013-08-20, 09:19)stupid-boy Wrote: [ -> ]if you didn't noticed already, recently there is 'weather.addon' hammering added too. i thing it is part of confluence skin.

Even with Weather disabled, the network (although more likely the addons db, as my addons are over NFS) is still being hit every frame - it's craziness.
actual problem here:
CGUILabel:Tonguerocess return true if it CAN scroll, not if it must and will scroll. i propose adding bool bScroll param to it, which, if false, will bypass entire function.
directly affected controls from this fix will be: GUICheckMarkControl; GUIEditControl; GUILabelControl; GUIListLabel and GUISelectButtonControl. all of them will affect CPU usage if their label(s) can scroll.

i need your and at least jmarshall position on that.
as i don't receive any feedback on my last question, i made #3128 pull request for that.
If you have any high CPU gui issues (when screen appears to be static) that look like bugs in the dirty rectangle code, then report here:
http://forum.xbmc.org/showthread.php?tid=171784
(2013-08-21, 21:54)popcornmix Wrote: [ -> ]If you have any high CPU gui issues (when screen appears to be static) that look like bugs in the dirty rectangle code, then report here:
http://forum.xbmc.org/showthread.php?tid=171784

please also attach screenshots where and how to get there (as well als DR mode)
Pages: 1 2 3 4