Kodi Community Forum

Full Version: Fast skin guideline
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey friends!
I wonder does somebody knows what are the guidelines for having a fast skin that work well on low end devices?
Use variables rather than visibles is one...
Hey badaas!
You mean having 1 control with var over say two controls with different visible tag?
Yes, that's what he means
Thanks marcel that's helpful though I already done it.
My skin is still quite slow on low end devices.
Be carefull with animations is another tip.

Also, do you have a lot of different views ? When a user loads one of the libraries all view's xml code will be loaded.
On slower devices that can take some time. Maybe
Finalmakerr,

While some of this may no longer be relevant this thread would certainly give you some pointers. Biggest hint I would give is "I/O is evil" particularly on low speced systems. Anything you can do to avoid file I/O will help with performance as I/O is easily the slowest operation performed. One trick I use to good effect is to turn off fanart backgrounds while the user is scrolling. Also try to avoid using multiple image layers as the images are still being rendered even if the user can't see then. In this case I use a multi image control with a variable as the image source for all my backgrounds. One image control with an image that is resolved to true from the variable instead of multiple images stacked atop each other. That way you have less I/O, less memory used and less controls for the gui to process. Win, win, win.

Wyrm
(2017-03-11, 20:08)finalmakerr Wrote: [ -> ]Hey badaas!
You mean having 1 control with var over say two controls with different visible tag?

Yes, sorry was in rush as usual! thanks @Marcel
Images can be placed on even boundarys iirc, something divisible by something, will try find..

Code:
1.1 Size

Images should be as close as possible to the nearest highest power of 2 in width and height. The reason for this is Kodi uses swizzled textures which are quicker to render and quicker to load once they're compressed into the Textures.xpr file. Note that the image does not need to be square, and will not be scaled into a power of 2 size. Rather, any pixels outside of a power of two size will simply be dead space (wasted memory). If you cannot manage this, then XBMCTex will opt for a linear (non-swizzled) texture format which must be aligned to 64 pixels in the horizontal, but has no restrictions in the vertical direction. These are slightly slower to load and render, but for the most part there's not a lot of difference. The XBMCTex program that does the image injection into Textures.xpr will tell you what format it's using, and how much pixel wastage (memory waste) is contained in each image.
(2017-03-11, 23:11)marcelveldt Wrote: [ -> ]Be carefull with animations is another tip.

Also, do you have a lot of different views ? When a user loads one of the libraries all view's xml code will be loaded.
On slower devices that can take some time. Maybe

Animation is my big concern atm, i am working on reducing them! About views i do have some in my skins ofcourse, about 6-7 but again that's not like Titan which have way more lol.
So about views if i make a setting for performance and add <include condition=""></include> for the:
<views>50,51,54,56,57,58,59</views>
will it make the skin faster?
Thank you for mentioning that @badaas!
So i am about to change my images according to this rule
Anything i should consider regarding the Bit depth? Should i use only 8 bits or 16 bits or 32 bits? Does it make any difference at all?

Another question:
<texture background=true..
When should i best use it?
(2017-03-13, 10:08)finalmakerr Wrote: [ -> ]Thank you for mentioning that @badaas!
So i am about to change my images according to this rule
Anything i should consider regarding the Bit depth? Should i use only 8 bits or 16 bits or 32 bits? Does it make any difference at all?

Another question:
<texture background=true..
When should i best use it?

http://kodi.wiki/view/Texture_Attributes
(2017-03-12, 13:19)finalmakerr Wrote: [ -> ]
(2017-03-11, 23:11)marcelveldt Wrote: [ -> ]Be carefull with animations is another tip.

Also, do you have a lot of different views ? When a user loads one of the libraries all view's xml code will be loaded.
On slower devices that can take some time. Maybe

Animation is my big concern atm, i am working on reducing them! About views i do have some in my skins ofcourse, about 6-7 but again that's not like Titan which have way more lol.
So about views if i make a setting for performance and add <include condition=""></include> for the:
<views>50,51,54,56,57,58,59</views>
will it make the skin faster?


Yes, that really makes a difference. It's the whole reason I created the disable views feature in skinhelper


Verzonden vanaf mijn iPhone met Tapatalk
(2017-03-13, 19:04)badaas Wrote: [ -> ]http://kodi.wiki/view/Texture_Attributes

Thanks a lot mate!
Please answer this:
1. Should i have all images atleast 64 pixels in the horizontal? If i have say hundreds of colors images (To be used only with colordiffuse) but they are 16x16, should i enlarge those to 64x64?
2. Bit Depth 32 is OK or should i use 16 or even 8 in some cases?
(2017-03-14, 18:22)finalmakerr Wrote: [ -> ]
(2017-03-13, 19:04)badaas Wrote: [ -> ]http://kodi.wiki/view/Texture_Attributes

Thanks a lot mate!
Please answer this:
1. Should i have all images atleast 64 pixels in the horizontal? If i have say hundreds of colors images (To be used only with colordiffuse) but they are 16x16, should i enlarge those to 64x64?
2. Bit Depth 32 is OK or should i use 16 or even 8 in some cases?

I haven't gone into it that deeply, hopefully a clued up DEV will appear.
And why 100's of color images?