PDA

View Full Version : Skin performance/responsiveness profiling. Python and C++ rendering core questions.



scanline
21-03-18, 11:51
Hi,

Not sure if this is the best sub-forum for these skin development questions.

I've spent some time experimenting with skin mods (XML and Python changes), so I've got some idea of the basic E2 code layout. I'm now trying to find out what areas in Enigma2 contribute to sluggish behaviour redrawing the interface.

Can anyone clarify:
- does E2 parse all XML files from the active skin at startup or only when called (eg when user presses the info button)

- does the XML get translated into any intermediate format/code to improve performance?

- are skin icons loaded into memory each and every time a menu is called or cached in RAM?

- for the .py/.pyo files, if a user brings up, say, the InfoBar, does the Python interpreter import the modules at the top of the relevent file(s) each and every time the window is displayed?

- is there a way through the Python API to write directly to the frame buffer

- can anyone point me to details on E2's core rendering system or is it a case of having to read through the C source?

The main EPG is especially slow on budget hardware like my Octagon SF228. Moving the EPG cursor down one program takes several hundred ms to refresh, where it should only be redrawing a small area of the screen. By contrst the main menu on the default theme loads almost instantly but with the MatrixHD skin, it's quite noticably slower.

birdman
21-03-18, 13:26
- for the .py/.pyo files, if a user brings up, say, the InfoBar, does the Python interpreter import the modules at the top of the relevent file(s) each and every time the window is displayed?Once a source file has been loaded it's loaded. That's why you need to restart the GUI if you put an updated source file in place while debugging/testing.

scanline
23-03-18, 20:09
Once a source file has been loaded it's loaded. That's why you need to restart the GUI if you put an updated source file in place while debugging/testing.

Yep, and the same seems to hold true for the XML files which also require a reboot. But assets like images are loaded each time you switch to a menu. Eg, if you go to the main menu, then save over the background image and go to a submenu, any changes to the image will be visible. So E2 is potentially loading a 1920x1080 PNG on every menu change - quite an overhead for low-powered hardware.

The latency through the menus is significantly improved when the BG image is removed.