Question regarding optimization and conditional visibility/includes?
Leeuw
Senior Member Joined: Apr 2009 Reputation: 0 |
Apologies if this is in another thread somewhere, but I was wondering how xbmc handles controls that are hidden, as opposed to controls that are not included because of a conditional include. For example, would there be an optimization hit (in terms of memory, cache, cpu usage) to having a window with a lot of objects "present", but no more than a few actually visible at any one time?
Aeon Faq- (Very Unofficial) Aeon FAQ Aeon Mods/Fixes- [MOD] List View rev2 / [FIX] Contextual fanart in music list / [MOD] Multiplex C-Thru / [MOD] Night Themed Fullscreen Info |
| find quote |
Jezz_X
Team-XBMC Skinner Joined: Jun 2006 Reputation: 55 Location: Earth |
2009-07-03 05:22
Post: #2
jmarshall is the best to answer but pretty sure anything thats not visible doesn't take up any more memory than the text for the control itself in memory. It doesn't actually start using memory until the images/text are visible for it.
It might of course slow things down with 100's of conditions being constantly checked but not sure of the impact of that. Note Visible of course mean <visible> tag not somthing made 100% transperant with an animation that still takes up the normal memory Skins I have done.... ![]() And others in the past... Want to know what I'm working on currently? Check me out on Google+
(This post was last modified: 2009-07-03 06:03 by Jezz_X.)
|
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2009-07-03 05:53
Post: #3
If controls are present then they're a performance hit whether they're visible or not.
Every frame, we check every control for it's visibility. The actual rendering of the control isn't much more than this. Thus, if you don't need the control, get rid of it. Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Leeuw
Senior Member Joined: Apr 2009 Reputation: 0 |
2009-07-03 07:14
Post: #4
Thanks!
Aeon Faq- (Very Unofficial) Aeon FAQ Aeon Mods/Fixes- [MOD] List View rev2 / [FIX] Contextual fanart in music list / [MOD] Multiplex C-Thru / [MOD] Night Themed Fullscreen Info |
| find quote |
Hitcher
Skilled Skinner Joined: Aug 2007 Reputation: 67 Location: Eastleigh, UK |
2009-07-03 07:31
Post: #5
Interesting, thanks.
![]() |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2009-07-03 08:01
Post: #6
Note that, as the original poster indicated, controls that are only included via conditional includes is a different story - if the include condition evaluates false, they're not included, and thus no performance hit at all.
Thus, big blocks of code that don't need to be there all the time should be conditionally included. Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |
Hitcher
Skilled Skinner Joined: Aug 2007 Reputation: 67 Location: Eastleigh, UK |
2009-07-03 23:28
Post: #7
And am I correct in assuming that the include condition is only checked upon loading the window and not every frame.
![]() |
| find quote |
jmarshall
Team-XBMC Developer Posts: 24,523 Joined: Oct 2003 Reputation: 138 |
2009-07-04 03:28
Post: #8
Correct. After all, otherwise there would be no difference between them.
Cheers, Jonathan Always read the XBMC online-manual, FAQ and search the forum before posting. Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules. For troubleshooting and bug reporting please make sure you read this first. ![]() |
| find quote |


![[Image: skinsq.png]](http://img854.imageshack.us/img854/931/skinsq.png)
![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)
![[Image: sig_zps3af3b48e.jpg]](http://i620.photobucket.com/albums/tt289/Arcanthur/Celestium/sig_zps3af3b48e.jpg)
Search
Help