You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Python script that I have running once a second, which uses Playerctl to fetch data about currently running players.
The only way I found to do so is to create a new Player for each player name from list_players(), because PlayerManager doesn't get information about newly appearing or closing players unless I recreate it in loop too. But this occupies more and more memory each time, even if invoke Python's garbage collector after each loop.
Same issue seems to occur even if I preserve
My script and the problem could be boiled down to this:
I have a Python script that I have running once a second, which uses Playerctl to fetch data about currently running players.
The only way I found to do so is to create a new
Player
for each player name fromlist_players()
, becausePlayerManager
doesn't get information about newly appearing or closing players unless I recreate it in loop too. But this occupies more and more memory each time, even if invoke Python's garbage collector after each loop.Same issue seems to occur even if I preserve
My script and the problem could be boiled down to this:
Running this slowly drains more and more system memory. I may be missing a better way about this though, but I'm unsure.
The text was updated successfully, but these errors were encountered: