Is a diffuse effect "heavy" on the CPU / GPU? + General tips to making lighter skin
#1
Hi everyone,

I am currently making a very lightweight skin, mainly designed for low power devices (raspberry pi etc.) - Do any of you know if using a diffuse effect on a texture (to give images rounded corners etc.), is considered a "heavy" job in terms of CPU / GPU for Kodi - or shouldn't i worry about this?

Any other hints in terms of making a lightweight skin is very appreciated!

Thanks, and Merry Christmas Wink
Reply
#2
If you want a lightweight skin then you definitely avoid using diffuses.

As for tips -

http://kodi.wiki/index.php?title=Texture_Attributes

Note: I'm not sure if the same now applies to XBTs.
Reply
#3
Andersfisker,

Has been discussed a number of times before, try this link https://forum.kodi.tv/showthread.php?tid=236545 . But biggest slowdown has always been I/O. Keep all of your graphic files small if you can and let the Gpu scale at a almost zero cost.

Wyrm (AppTV)
Reply
#4
see: https://forum.kodi.tv/showthread.php?tid...pid1390823

btw all posts made by jmarshall in that thread are worth reading if you're interested in skin optimizations
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
FYI:

I faced a lot of speed penalties in LE yesterday (with my Embuary skin) and I was able to reproduce on my office PC (Windows + Intel iGPU). 
My skin has a lot of visible ListItem labels at the same time. I've noticed that removing them will increase the performance up to 50%. And one main GPU eater is the defined <shadowcolor> of the labels. Without a shadow color I get up to 10 (idle) better and up to 10-20 minium fps while scrolling.

I use a lot of diffuse and colordiffuse in my skin and none of it causes the same slowdown as the labels/shadowcolor.

My desktop machine (8700k + nvidia 1080 GTX) has no problems. Just the iGPU of my office laptop and my HTPC i3 Skylake NUC.

Edit:
Disabling the dirty regions rendering with <algorithmdirtyregions>0</algorithmdirtyregions> also helps in my case. Much less stuttering but the amount of ListItem labels still causeing a frame drop of 5-10fps while idling. But <shadowcolor> isn't as much as expensive anymore.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#6
(2018-02-27, 11:03)sualfred Wrote: FYI:

I faced a lot of speed penalties in LE yesterday (with my Embuary skin) and I was able to reproduce on my office PC (Windows + Intel iGPU). 
My skin has a lot of visible ListItem labels at the same time. I've noticed that removing them will increase the performance up to 50%. And one main GPU eater is the defined <shadowcolor> of the labels. Without a shadow color I get up to 10 (idle) better and up to 10-20 minium fps while scrolling.

I use a lot of diffuse and colordiffuse in my skin and none of it causes the same slowdown as the labels/shadowcolor.

My desktop machine (8700k + nvidia 1080 GTX) has no problems. Just the iGPU of my office laptop and my HTPC i3 Skylake NUC.

Edit:
Disabling the dirty regions rendering with <algorithmdirtyregions>0</algorithmdirtyregions> also helps in my case. Much less stuttering but the amount of ListItem labels still causeing a frame drop of 5-10fps while idling. But <shadowcolor> isn't as much as expensive anymore.
Thanks for heads up. Will test performance improvements on rpi3 Smile
Reply
#7
I used diffuses for rounded corners pretty much everywhere in Arctic:Zephyr and it's probably one of the fastest skins out there. There is a slight cost, but not that much. Focus more on reducing the number of textures, texture resolution, number of controls, amount of animations, complexity of animations, and number of visibility conditions. Anything that auto-scrolls makes the screen re-draw and will cost CPU. Try to avoid String or Integer checks (e.g. String.Contains or Integer.IsGreater) where possible if another boolean can be used instead - e.g. ListItem.IsParentFolder is probably going to be faster than String.Contains(ListItem.Label,..) because the former is just a true/false flag, whilst the latter has to constantly check the string to see if it contains the label.

The big thing I've noticed is that visible conditions are quite costly, so you want to reduce them as much as you can through a combination of variables and conditional includes.
Don't use multiple label/image controls with visible conditions if a variable will work instead.
If a control (or group of controls) is only visible in certain windows, use a conditional include instead of a visible condition.

Try to minimise the total number of viewtypes available because each additional viewtype is another chunk of code which is loaded into memory and having its visible condition checked every frame. The resource cost really starts adding up surprisingly quickly. If a particular viewtype is only used in MyVideoNav, then make sure you aren't also including it in MyMusicNav. I just did a clean-up of viewtypes in Aura, and moving each view into its own individual include made a massive difference in resource cost (previously I had all the views in one big include).
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
(2017-12-25, 00:49)ronie Wrote: see: https://forum.kodi.tv/showthread.php?tid...pid1390823

btw all posts made by jmarshall in that thread are worth reading if you're interested in skin optimizations
 BTW, what is why the legend @jmarshall departed, association with K/X or?...
Reply
#9
he got interested in other projects.
https://github.com/jmarshall
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Is a diffuse effect "heavy" on the CPU / GPU? + General tips to making lighter skin0