Skip to content
Commit 99c90305 authored by Eike Hein's avatar Eike Hein
Browse files

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
parent f1a648f2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment