Bug 272583

Summary: Performance issue in icon view (very noticeable when viewing collections with high resolution images)
Product: [Applications] tellico Reporter: PC LX <kde>
Component: generalAssignee: Robby Stephenson <robby>
Status: RESOLVED FIXED    
Severity: normal CC: fest.in
Priority: NOR    
Version: HEAD   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: PATCH: Icon caching to improve the icon view performance

Description PC LX 2011-05-06 00:24:02 UTC
Version:           svn (using KDE 4.4.5) 
OS:                Linux

When the icon view is showing, the icons are recreated from the full size images every time they are (re)drawn. This has a significant and very noticeable performance impact, especially when the collection has high resolution images. 

Reproducible: Always

Steps to Reproduce:
Create a collection containing items with high resolution images (e.g. several mega pixels). Enable the icon view in the configuration menu. Select all items in the collection. Scroll the icon view.

Actual Results:  
Very low redraw rate and scroll speed. Very high CPU usage.

Expected Results:  
Smooth scrolling with minimal CPU usage.

I have written a patch that solves this issue. It uses a cache of icons to minimize icon creation at the expense of some memory. I cloned the head of the git repository and wrote these changes on it. The patch is small so it should be quick to review and apply.
Comment 1 PC LX 2011-05-06 00:26:32 UTC
Created attachment 59673 [details]
PATCH: Icon caching to improve the icon view performance
Comment 2 PC LX 2011-05-06 00:28:38 UTC
From the description bug 251166 may have some relation to this bug.
https://bugs.kde.org/show_bug.cgi?id=251166
Comment 3 Robby Stephenson 2011-05-06 17:53:45 UTC
*** Bug 251166 has been marked as a duplicate of this bug. ***
Comment 4 Robby Stephenson 2011-05-06 19:26:24 UTC
Git commit fc091bae061db5d7e3f5d62bb3b10a4b64820b71 by Robby Stephenson.
Committed on 06/05/2011 at 19:37.
Pushed by rstephenson into branch 'master'.

Add icon cache to improve icon view performance.
Initial cache size is 1000 and can be changed with
"Icon Cache Size" general config option.

Patch from Pedro Miguel Carvalho.
BUG:272583

M  +5    -0    ChangeLog     
M  +3    -0    src/core/tellico_config.kcfg     
M  +22   -10   src/models/entrytitlemodel.cpp     
M  +7    -2    src/models/entrytitlemodel.h     

http://commits.kde.org/tellico/fc091bae061db5d7e3f5d62bb3b10a4b64820b71
Comment 5 Robby Stephenson 2011-05-06 19:31:24 UTC
(In reply to comment #1)
> Created an attachment (id=59673) [details]
> PATCH: Icon caching to improve the icon view performance

Thank you very much for the patch.