Task manager is too slow for managing large numbers of programs of the same type.
STEPS TO REPRODUCE
Use the default Plasma5 panel configuration in which tasks are shown on the task bar.
Create 50 instances of Konsole and try to switch to the lowest one in the menu being generated.
It takes 2-3 seconds to build the menu that allows one to switch between Konsole instances (with 5GB RAM free).
The menu should be built in less than 100ms or at least a factor of 20-30 compared to the current performance level.
KDE Plasma Version: 5.13.4
KDE Frameworks Version: 5.49.0
Qt Version: 5.11.1
RECOMMENDED CHANGE IN PROCESS
Add performance test for this feature to your continuous integration solution such that this won't be a regression in the future. Specifically, I would like to see a graph with number of konsole sessions managed vs the time it takes to build up the menu and I would like to see a linear scaling in the graph.
It's a very niche case, however, on a quick glance there is room for improvement for large number of windows.
TaskList is a flow+repeater rather than a ListView, meaning we're instantiating N delegates at once rather than just the ones in the view.
More importantly updateView is called repeatedly during delegate insertion, rather than after initial (re)population.
Solving the latter will probably be enough to close this.
Git commit ab26ebb18b74d8def8e653dc94516fa7da935a5c by Eike Hein.
Committed on 19/11/2018 at 09:40.
Pushed by hein into branch 'Plasma/5.12'.
Compress calls to `updateSize`
Repeater+Flow has no reliable way to transactionize/batch insertion,
e.g. `Flow.positionCompleted` is useless in a function that can change
the Flow's size, and transition events like populated and similar
aren't available. Refactoring this to be a ListView isn't appealing
because it would mean the code loses the property of being reused for
both the bar and the popup, and therefore is well-tested already.
This brings down the number of `updateSize` calls when opening the
dialog for a group of five from five to one.
Reviewers: #plasma, davidedmundson
Differential Revision: https://phabricator.kde.org/D17006
M +4 -4 applets/taskmanager/package/contents/ui/GroupDialog.qml
M +1 -1 containments/desktop/package/contents/ui/FolderItemDelegate.qml