Spamming WINDOW.setProperty causes memory leak.
#1
Question 
For some reason spamming WINDOW.setProperty(key, value) 100-500 times makes it build up ram up to 12gb, before becoming too slow to continue spamming.
This doesn't occur when using: xbmc.executebuiltin('SetProperty(key,"' + value + '", 10000)')

Is this working as intended?
Reply
#2
Which version of Kodi and which OS?

With Kodi 21 under Linux I can spam 100000 properties and I can't see my memory usage go up at all (beyond the normal usage fluctuation of a few mb).

My test script:-
python:
 def main():
    pDialog = xbmcgui.DialogProgress()
    pDialog.create('Kodi', "Setting Properties")  
    for a in range(0,100000):
        pDialog.update(int(a/1000.0), message = f'Property {a} of 100000')
        xbmcgui.Window(10000).setProperty(f'test{a}',f'value-{a}')
Reply
#3
My bad, I made a stupid assumption when I noticed using xbmc.executebuiltin fixed the issue.
Your code works fine, even when using 256 character long strings, so I'll have to take another look to see where I messed up.

Thanks for the help! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Spamming WINDOW.setProperty causes memory leak.0