Bug 348183 - gnome-main-menu startup time > 1min + 100% CPU
Summary: gnome-main-menu startup time > 1min + 100% CPU
Status: RESOLVED DUPLICATE of bug 230478
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Final
Hardware: Other openSUSE 10.3
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Federico Mena Quintero
QA Contact: E-mail List
URL:
Whiteboard: gnome-performance
Keywords:
Depends on:
Blocks: main-menu-perf
  Show dependency treegraph
 
Reported: 2007-12-12 19:46 UTC by Forgotten User CRPsQFwJ3b
Modified: 2008-04-01 00:45 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
strace log (2.54 MB, application/x-bzip2)
2007-12-12 19:47 UTC, Forgotten User CRPsQFwJ3b
Details
new strace log (2.57 MB, application/x-bzip2)
2007-12-13 04:01 UTC, Forgotten User CRPsQFwJ3b
Details
Annotated strace (2.57 MB, text/plain)
2007-12-13 15:48 UTC, Federico Mena Quintero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User CRPsQFwJ3b 2007-12-12 19:46:11 UTC
The gnome-main-menu needs more than 1min to startup (means for the button to appear in the panel) on my system (Core 2 Duo, 1gb ram) and during this 1min or more it maxes out my CPU. This is valid not only on startup, but also if I kill it and then run it myself from the terminal.

I am attaching strace log if that helps identify the problem.
Comment 1 Forgotten User CRPsQFwJ3b 2007-12-12 19:47:34 UTC
Created attachment 187295 [details]
strace log
Comment 2 Federico Mena Quintero 2007-12-12 22:23:27 UTC
Wow, this is really bad...

Could you please get an strace again but with these options?

strace -ttt -f -o /tmp/output.txt /usr/lib/gnome-main-menu/main-menu

This will give us timestamps in the log, which will make it easier to understand.
Comment 3 Forgotten User CRPsQFwJ3b 2007-12-13 04:01:58 UTC
Created attachment 187330 [details]
new strace log
Comment 4 Federico Mena Quintero 2007-12-13 15:38:55 UTC
Ugh... several things:

* Gnome-main-menu is spending 30 seconds reading *all* your ~4300 thumbnails.  I wonder why it tries to read them all.  This is a bug we need to fix, but in the meantime you could try wiping your ~/.thumbnails and see if that improves things.

* Your icon cache is not up to date, and so application icons are being read individually instead of using the cache.  You can run SuSEconfig as root to fix this.

* Finally, did you put the strace log file in your home directory?  We are getting thousands of inotify events there; this happens when you start creating a log while also monitoring it :)  You can use a log file in /tmp in the future to keep this from happening.

Could you please run these:

grep -i uri ~/.recently-used | wc -l
grep -i href ~/.recently-used.xbel | wc -l

and paste the output?  I suspect that main-menu tries to read the thumbnails for *all* your recent files, even if it's only going to display a few of them.
Comment 5 Federico Mena Quintero 2007-12-13 15:48:26 UTC
Created attachment 187465 [details]
Annotated strace

This is the annotated version of your strace log; we'll use it for reference later when fixing main-menu's performance problems.

Grep for "FMQ" in the log to see the annotations.
Comment 6 Federico Mena Quintero 2007-12-13 17:12:37 UTC
JPR says there may be a fix for this in SLED10.
Comment 7 Forgotten User CRPsQFwJ3b 2007-12-13 19:28:33 UTC
Unfortunately I will be able to test in a month, because I will be spending my time in a different country till the 10th January.
Comment 8 Andreas Jaeger 2008-02-19 12:34:34 UTC
Ivan, any update?
Comment 9 Forgotten User CRPsQFwJ3b 2008-02-19 15:14:56 UTC
(In reply to comment #4 from Federico Mena Quintero)
>
> Could you please run these:
> 
> grep -i uri ~/.recently-used | wc -l
> grep -i href ~/.recently-used.xbel | wc -l
> 
> and paste the output?  I suspect that main-menu tries to read the thumbnails
> for *all* your recent files, even if it's only going to display a few of them.
> 

[~]$ grep -i uri ~/.recently-used | wc -l
11
[~]$ grep -i href ~/.recently-used.xbel | wc -l
4113
Comment 10 Forgotten User CRPsQFwJ3b 2008-02-19 15:15:34 UTC
(In reply to comment #8 from Andreas Jaeger)
> Ivan, any update?
> 

I am using gnome-main-menu-0.9.8-120.7 from GNOME:STABLE and there is no difference. Is there another package I should try?
Comment 11 Federico Mena Quintero 2008-04-01 00:45:41 UTC

*** This bug has been marked as a duplicate of bug 230478 ***