GNOME Bugzilla – Bug 723172
universal-cp: Avoid find_device() recursion when possible
Last modified: 2019-02-22 05:57:31 UTC
Was looking at why my laptop was running hot so often, and found this... We do a lot of unnecessary treemodel lookups because find_device() processes every row in the model. I think this fix makes sense, but there is a possible design improvement as well: on_state_variable_change() gets called often and ends up finding, creating and destroying the same device proxies all the time just to get the device name. We could start storing the name.
Created attachment 267411 [details] [review] universal-cp: Avoid find_device() recursion when possible This should limit the massive processor usage in busy networks, as the old implementation recursed into every service, state variable and method. This patch only recurses into sub-devices.
Attachment 267411 [details] pushed as 71d4f41 - universal-cp: Avoid find_device() recursion when possible