Bug 272583 - Performance issue in icon view (very noticeable when viewing collections with high resolution images)
Summary: Performance issue in icon view (very noticeable when viewing collections with...
Alias: None
Product: tellico
Classification: Applications
Component: general (show other bugs)
Version: HEAD
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Robby Stephenson
: 251166 (view as bug list)
Depends on:
Reported: 2011-05-06 00:24 UTC by PC LX
Modified: 2011-05-07 23:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

PATCH: Icon caching to improve the icon view performance (2.65 KB, patch)
2011-05-06 00:26 UTC, PC LX

Note You need to log in before you can comment on or make changes to this bug.
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.
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.

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     

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.