[Bug 338024] New: main-menu uses a lot of cpu resources
https://bugzilla.novell.com/show_bug.cgi?id=338024 Summary: main-menu uses a lot of cpu resources Product: openSUSE 10.3 Version: Final Platform: i686 OS/Version: openSUSE 10.3 Status: NEW Severity: Normal Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: mwelinder@gmail.com QAContact: qa@suse.de Found By: --- main-menu is using up a awful lot of cpu resources for a program that I basically use once a day. I don't really see a reason why it should wake up at all until I click on the "Computer" button. # top [...] PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2836 welinder 16 0 175m 95m 6816 S 0.3 19.4 356:03.41 main-menu # uptime 9:07pm up 12 days 0:45, 6 users, load average: 1.10, 1.11, 0.90 i.e., 30 cpu minutes per day. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=338024
Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=338024#c1
Magnus Boman
https://bugzilla.novell.com/show_bug.cgi?id=338024#c2
Morten Welinder
Please explain why the current CPU cycles used is a problem.
CPU cycles == battery time. A busy main-menu means the computer is less useful for travel. But seriously, did you take a look at what main-menu really does? Throw strace at it and observe: * It reads /proc/mounts and /proc/partitions. It then stats everything mentioned in there. * It appears to be talking to NetworkManager via dbus. * It stats about 100 directories like /usr/local/share/icons And it does all of those every few seconds! If it wants to know when some files change, then it should arrange for a wakeup call when they do. inotify should work for that. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=338024
Federico Mena Quintero
https://bugzilla.novell.com/show_bug.cgi?id=338024
Scott Reeves
https://bugzilla.novell.com/show_bug.cgi?id=338024
Scott Reeves
https://bugzilla.novell.com/show_bug.cgi?id=338024
User federico@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c4
Federico Mena Quintero
https://bugzilla.novell.com/show_bug.cgi?id=338024
User mwelinder@gmail.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c5
--- Comment #5 from Morten Welinder
https://bugzilla.novell.com/show_bug.cgi?id=338024
User jpr@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c6
JP Rosevear
Please explain why the current CPU cycles used is a problem.
CPU cycles == battery time. A busy main-menu means the computer is less useful for travel.
But seriously, did you take a look at what main-menu really does? Throw strace at it and observe:
* It reads /proc/mounts and /proc/partitions. It then stats everything mentioned in there.
Not sure about this, I doubt its direct work in the menu but probably unnecessary work.
* It appears to be talking to NetworkManager via dbus.
Yes, its probably polling for state and doing it all the time rather than just on open. The problem as I recall is that stacking up a bunch of stuff for work can then cause the menu to take a long time to open, so this will have to be but in a thread presumably (and maybe figure out a way not to blink icons or have UI inconsistencies).
* It stats about 100 directories like /usr/local/share/icons
And it does all of those every few seconds!
If it wants to know when some files change, then it should arrange for a wakeup call when they do. inotify should work for that.
For applications the gmenu library from gnome-desktop is used. I think its using inotify underneath. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=338024
User federico@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c7
Federico Mena Quintero
https://bugzilla.novell.com/show_bug.cgi?id=338024
Federico Mena Quintero
https://bugzilla.novell.com/show_bug.cgi?id=338024
User bwhiteley@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c8
Bart Whiteley
https://bugzilla.novell.com/show_bug.cgi?id=338024
User bwhiteley@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c9
--- Comment #9 from Bart Whiteley
https://bugzilla.novell.com/show_bug.cgi?id=338024
User bwhiteley@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c10
--- Comment #10 from Bart Whiteley
https://bugzilla.novell.com/show_bug.cgi?id=338024
User federico@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=338024#c11
Federico Mena Quintero
participants (1)
-
bugzilla_noreply@novell.com