Bug 191666 - strace shows access missing icons when showing html mails
Summary: strace shows access missing icons when showing html mails
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.11.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 201131 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-05 11:06 UTC by DonMartio
Modified: 2009-07-22 22:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DonMartio 2009-05-05 11:06:21 UTC
Version:           1.11.2 (using KDE 4.2.2)
Compiler:          gcc-4.1.2 
OS:                Linux
Installed from:    Gentoo Packages

Everytime i receive an html mail kmail slows down my whole machine.

When i connect to the running kmail process using strace i get a lot of this:

access("/usr/kde/4.2/share/icons/oxygen/64x64/intl/image.svg", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/kde/4.2/share/icons/oxygen/64x64/intl/image.svg", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/kde/4.2/share/icons/oxygen/64x64/mimetypes/image.svg", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/kde/4.2/share/icons/oxygen/64x64/mimetypes/image.svg", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/kde/4.2/share/icons/oxygen/64x64/places/image.svg", R_OK) = -1 ENOENT (No such file or directory)

This is a little bit anoying. Is there any way to stop this 'lookup things you know they arent there'?
Comment 1 DonMartio 2009-05-11 12:08:44 UTC
Ok here is some kind of workaround:

- Install Icon Theme 'Oxygen Refit Black'
- Go to ~/.kde4.2/share/icons/OxygenRefit2-black-version
- Execute as root:
for i in $(find . -name image\*); do 
  if [ ! -f /usr/kde/4.2/share/icons/oxygen/$i ]; then 
    echo $i does not exist
    mkdir /usr/kde/4.2/share/icons/oxygen/$(dirname $i)
    cp $i /usr/kde/4.2/share/icons/oxygen/$i
  fi
done

Maybe this is a gentoo issue. Otherwise it could be managed upstream in kmail i think.
Comment 2 Thomas McGuire 2009-06-20 00:21:12 UTC
SVN commit 984088 by tmcguire:

Speed up display of mails with many attachments, by introducing a cache in the code
that maps the mimetype to an icon name. The icon name was often not found, like for
image_jpeg, and that was slow.

According to the bug report, this improves message display from 20 to 3 seconds in some
cases.

Thanks to Martin for finding the reason for the speed problem.

BUG: 189961
BUG: 191666


 M  +1 -0      CMakeLists.txt  
 A             iconnamecache.cpp   [License: LGPL (v2/3+eV)]
 A             iconnamecache.h   [License: LGPL (v2/3+eV)]
 M  +2 -6      kmmsgpart.cpp  
 M  +1 -1      kmreaderwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=984088
Comment 3 Thomas McGuire 2009-06-24 14:08:04 UTC
SVN commit 986223 by tmcguire:

Crossport r984088 by tmcguire from trunk to the enterprise4 branch:

Speed up display of mails with many attachments, by introducing a cache in the code
that maps the mimetype to an icon name. The icon name was often not found, like for
image_jpeg, and that was slow.

According to the bug report, this improves message display from 20 to 3 seconds in some
cases.

Thanks to Martin for finding the reason for the speed problem.

CCBUG: 189961
CCBUG: 191666



 M  +1 -0      CMakeLists.txt  
 A             iconnamecache.cpp   trunk/KDE/kdepim/kmail/iconnamecache.cpp#984088 [License: LGPL (v2/3+eV)]
 A             iconnamecache.h   trunk/KDE/kdepim/kmail/iconnamecache.h#984088 [License: LGPL (v2/3+eV)]
 M  +2 -6      kmmsgpart.cpp  
 M  +1 -1      kmreaderwin.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=986223
Comment 4 Christophe Marin 2009-07-22 22:39:40 UTC
*** Bug 201131 has been marked as a duplicate of this bug. ***