Review Request 112253: KStandardItemListWidgetInformant/KFileItemListWidgetInformant: do not call the model's data(int) method if only the "text" is needed

Commit Hook null at kde.org
Wed Sep 4 20:42:54 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112253/#review39378
-----------------------------------------------------------


This review has been submitted with commit 77fedd4844f4e74ba74f6e34997befba1dae222e by Frank Reininghaus to branch master.

- Commit Hook


On Aug. 24, 2013, 6:54 p.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112253/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2013, 6:54 p.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Description
> -------
> 
> As I said on the mailing list some time ago, I think we can reduce the memory usage considerably by lazy-loading most of the data for each item. However, this only makes sense if we reduce the number of calls to the model's data() method, which constructs the full QHash containing all data, as much as possible.
> 
> Currently, KStandardItemListWidgetInformant calls the data() method for every single item, but the full data is actually only needed for the size calculation in Compact View. In Details View, no data are needed at all to determine the size required for the item, and in Icons View, only the name is needed.
> 
> This patch makes it possible for subclasses of KStandardItemListWidgetInformant to provide an alternative way to obtain the "text", to prevent calling the data() method of the model.
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemlistwidget.h 24c6778 
>   dolphin/src/kitemviews/kfileitemlistwidget.cpp 3a77241 
>   dolphin/src/kitemviews/kstandarditemlistwidget.h 4bf6116 
>   dolphin/src/kitemviews/kstandarditemlistwidget.cpp 2a89004 
> 
> Diff: http://git.reviewboard.kde.org/r/112253/diff/
> 
> 
> Testing
> -------
> 
> Works. No regressions found so far.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130904/0a412a36/attachment.htm>


More information about the kfm-devel mailing list