After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723172 - universal-cp: Avoid find_device() recursion when possible
universal-cp: Avoid find_device() recursion when possible
Status: RESOLVED FIXED
Product: gupnp-tools
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-28 15:15 UTC by Jussi Kukkonen
Modified: 2019-02-22 05:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
universal-cp: Avoid find_device() recursion when possible (1.76 KB, patch)
2014-01-28 15:15 UTC, Jussi Kukkonen
committed Details | Review

Description Jussi Kukkonen 2014-01-28 15:15:12 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.
Comment 1 Jussi Kukkonen 2014-01-28 15:15:14 UTC
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.
Comment 2 Jens Georg 2014-02-01 13:41:51 UTC
Attachment 267411 [details] pushed as 71d4f41 - universal-cp: Avoid find_device() recursion when possible