I have an addon that runs a timing sensitive routine. I have 2 screens coded in xml. These screens share several common features such as progress bars.
Right now I have about 30 text fields that I reconfigure when switching from one screen configuration to the other. I do this with 30 lines of xbmcgui.window(10000).setProperty('field','value') statements in my Python code.
My question is would my code execute faster if I hard coded the different text fields in my xml code and simply toggled the visibility field of each set from my python code? Then I'd only need one or 2 lines of Python code to select between the 2 screen configurations but my xml code would be 2 x longer.
Please let me know if you think this would be better posted in the skinning section (I'm a newbee).
Speed question? xml vs. python
Joined: Jan 2017
2017-06-17 00:37 Post: #1
(This post was last modified: 2017-06-17 00:39 by KM5TZ.)
Skilled Python Coder
Joined: May 2011
2017-06-17 01:28 Post: #2
Without code to review I can't give you specifics... In general setProperty is NOT as efficient as a static xml value... I recommend you use the below to monitor execution time.