Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
Another thing.
Right now for certain viewtypes I'm using different includes to load the actual viewtype layout, depending on what content type is being listed. I did this so I can use different infolabels for specific content types without having to resort to countless visibility conditions.
Now that skin variables are here I could also those for this purpose and bring down the amount of code for the entire viewtype.
What I'm wondering about though, are there any performance advantages or disadvantages for one or the other method?
As includes are only checked on window load, my guess would be using includes is the faster way. Am I correct in this assumption?
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
sorry guys for delay with answers here - was busy with moving in to new place
@Jeroen:
Includes will always be faster because their condition is evaluated only when skin is loading and then it basicly replace <include>include_name</include> in xml with proper "text" and then we translate xml to actual windows / controls / whatever. Skin Variables and visible/enable condition on the other hand are checked every frame so this cause some extra cpu load.
@Black:
If we are talking about boolean conditions - we have mechanism that stores value of boolean expression and if given condition was evaluated already in given frame - we will just use stored value instead of evaluating it again. This mean that if You used several "Container.Content(TvShows)" only first one will really be evaluated and stored, rest will use that stored value. So if using skin variables will allow You to get rid of some controls - this will be slightly faster.
@all
It's hard to talk about performance here - skin vars are generally slightly faster than using seperate controls with different visible conditions because we don't need to process several controls (we always check if any property of control changed to know if we need to redraw it). It won't be really noticeable difference - main purpose of this is simplify xmls.
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
2011-10-06, 16:01
(This post was last modified: 2011-10-06, 16:22 by pieh.)
that's a little weird - neither logos nor fanarts are displayed (doesn't matter if skin vars or old style) even if I don't have any dialog on top of tv guide window - do I need some special setup for this?
--edit: nvm, had to wipe addon database after updating
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3