High CPU usage when main window is open

Bug #1531587 reported by Jonas Frei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Haguichi
Fix Released
High
Stephen Brandt

Bug Description

I've noticed quite a high CPU usage of the 'haguichi' process when the main window is open. As soon as I close the window the CPU usage drops significantly. I attached the output of --debug whilst I left the window open for about 1min. I'm aware that this report is quite general, so let me know if I can assist you finding the cause of this. Using Arch-Linux.

$ haguichi --version
Haguichi 1.3.1

Revision history for this message
Jonas Frei (freijon) wrote :
Revision history for this message
Stephen Brandt (ztefn) wrote :

Interesting find. I can reproduce this on multiple distro's using GTK+ version 3.18, if you add at least one network to the list. The more networks you add the more cpu gets used.

Using GTK+ version 3.16 everything works normal. So I suspect one or more of these GtkTreeView changes is the root cause of the problem:
https://git.gnome.org/browse/gtk+/log/?h=gtk-3-18&qt=grep&q=treeview

When I have more time I will try to locate what GtkTreeView property or method within Haguichi is triggering this, by disabling things one by one (search, pixmaps, etc). Whatever there is to find I hope there's a way around, otherwise the solution lies in the hands of the GTK+ developers, whom are mainly good for creating new stuff and breaking existing stuff... not so much fixing old stuff like ol'treeviews.

Changed in haguichi:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Stephen Brandt (ztefn)
milestone: none → 1.3.2
Revision history for this message
Stephen Brandt (ztefn) wrote :

I've pinned the problem down to the text color requests in the CellLayoutDataFunc of the network view. It seems that requesting the colors over there triggered endless pixel cache updates.

To fix this the colors are now requested just once by the network view itself:
http://bazaar.launchpad.net/~ztefn/haguichi/1.3/revision/58

Changed in haguichi:
status: Triaged → Fix Committed
Revision history for this message
Jonas Frei (freijon) wrote :

I can confirm that your fix solved the issue, CPU is back to normal. I created a haguichi-bzr package for Arch Linux in the AUR for people who want to use haguichi with the fix incorporated.

Revision history for this message
Stephen Brandt (ztefn) wrote :

Great! =D

Revision history for this message
Stephen Brandt (ztefn) wrote :
Stephen Brandt (ztefn)
Changed in haguichi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.