Greatly improve Folder View performance and mem usage.

Authored by hein on Feb 10 2017, 11:55 AM.

Description

Greatly improve Folder View performance and mem usage.

Summary:
Profiling suggests that Folder View spends most of its time
in delegate creation, which occurs en masse during various
operations, e.g. scrolling the view or navigating folder
hierarchy via popup dialogs or drill-down in list view mode.

This patch makes FolderItemDelegate substantially cheaper
by bringing down its child object count considerably via
a number of techniques:

  • Moving things that don't need to be in the delegate outside of it (e.g. a Timer that can be shared, a Connections that does work that can be done outside the delegate and a very costly ColorScope that can be moved up in the hierarchy.
  • Lazy-loading the expensive FrameSvgItem only in states which require it to be shown.
  • Managing action button life time procedurally as they are only needed during hover and even then only under a host of other conditions (instead of using Loaders, to save objects).

Previously, scrolling a 7x6 Folder View widget pointed at
my /usr/bin was nigh-unusable, now it's very nearly all
smooth. The desktop mode is a little slower (due to
expensive drop shadows below text labels) but also benefits.

This is a big refactor and needs more testing. In particular,
the spring-loading behavior needs thorough checking due to
code refactors.

Reviewers: Plasma, broulik

Reviewed By: Plasma, broulik

Subscribers: broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D4343

Details

Committed
heinFeb 10 2017, 11:55 AM
Reviewer
Plasma
Differential Revision
D4343: Greatly improve Folder View performance and mem usage.
Parents
R119:f1a648f2214f: Merge branch 'Plasma/5.9'
Branches
Unknown
Tags
Unknown