Bug 251217

Summary: Menu slow on NFS due to inefficient icon lookup
Product: [Unmaintained] kdelibs Reporter: jss
Component: kdeuiAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aseigo, asraniel, jjm, rudd-o
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: access() calls on /usr/share/icons from strace output

Description jss 2010-09-14 15:24:45 UTC
Created attachment 51639 [details]
access() calls on /usr/share/icons from strace output

Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

Opening a new menu (i.e. Internet) for the first time since login can be very slow, especially on NFS, due to inefficient icon lookup.
I did a strace on plasma, grepping for "access(", and went through every submenu with the mouse.
Filtering out only access() systemcalls on /usr/share/icons/ in the strace output, there were 73803 access() calls. Needless to say, that kills performance, especially when the root filesystem is NFS.
Especially icons that aren't available in the icon theme used, in my case Oxygen, causes a lot of access() calls. E.g. a total of 611 access() calls are spent searching for the iceweasel icon.

Reproducible: Always

Steps to Reproduce:
1) Delete /var/tmp/kdecache-user/kpc/kde-icon-cache.* (unsure if this is necessary to reproduce)
2) Log in
3) strace $(pidof plasma-desktop) 2>&1 | fgrep "access("
4) Move the mouse through all submenus

Actual Results:  
A huge number of access() system calls.

Expected Results:  
From http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#implementation_notes :

"The algorithms as described in this document works by always looking up filenames in directories (a stat in unix terminology). A good implementation is expected to read the directories once, and do all lookups in memory using that information."

Note: the attachment icons-accesses.gz was created on KDE 4.3 using the classic menu, but KDE 4.4.5 shows the same behaviour using the Kickoff menu.
Comment 1 Beat Wolf 2010-09-14 23:04:51 UTC
from what i heard is that there are some improvements in that area for 4.6 or even 4.5.2
Comment 2 Aaron J. Seigo 2010-09-15 01:19:49 UTC
and this probably has zero to do with plasma, and everything to do with the icon loader. verifying that will require some looking into what kickoff is doing with the icons in particular, but i'll leave that for a rainy day or someone else because it is very likely to turn out to be an exercise in verifying that it should be fine and it's KIconLoader that is letting us down. iow, a high likliehood of wasted time, when there is much else to be doing. :/
Comment 3 Beat Wolf 2011-12-05 10:00:11 UTC
*** Bug 285616 has been marked as a duplicate of this bug. ***
Comment 4 Manuel Amador (Rudd-O) 2011-12-05 20:52:40 UTC
For the record, this behavior I see with Lancelot, but also with Amarok when browsing the menus or (!) mouseovering buttons on the interface.
Comment 5 Andrew Crouthamel 2018-11-06 15:14:34 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Andrew Crouthamel 2018-11-18 03:24:54 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Jonathan Marten 2021-02-02 12:33:41 UTC
Reported for old KDE version.
Please confirm if still a problem with current version.
Comment 8 Bug Janitor Service 2021-02-17 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2021-03-04 04:33:21 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!