Summary: | KFileItemModel wastes memory by needlessly storing default values in a QHash for every item | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Frank Reininghaus <frank78ac> |
Component: | view-engine: general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.11.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/938f773f1409ff037b718eadf427d7af25b915e0 | Version Fixed In: | 4.11.1 |
Sentry Crash Report: |
Description
Frank Reininghaus
2013-08-14 21:57:39 UTC
Git commit 938f773f1409ff037b718eadf427d7af25b915e0 by Frank Reininghaus. Committed on 14/08/2013 at 21:57. Pushed by freininghaus into branch 'KDE/4.11'. Do not store default values in QHash<QByteArray, QVariant> Storing values which are equivalent to default-constructed QVariants does not make much sense because QHash::value returns the same value even if the corresponding key is not found in the hash. This commit reduces Dolphin's memory consumption in large folders by up to 7.3% (tested a folder with 100,000 files in Details View) and reduces the time required for loading a folder. FIXED-IN: 4.11.1 REVIEW: 111922 M +10 -17 dolphin/src/kitemviews/kfileitemmodel.cpp M +0 -1 dolphin/src/kitemviews/kstandarditemlistwidget.cpp http://commits.kde.org/kde-baseapps/938f773f1409ff037b718eadf427d7af25b915e0 |