Bug 433907 - plasmashell works slow when displaying textual list of grouped tasks for big group
Summary: plasmashell works slow when displaying textual list of grouped tasks for big ...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.22.2
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
: 428351 429502 430317 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-03 12:16 UTC by darktemplar
Modified: 2021-11-16 01:34 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24
Sentry Crash Report:


Attachments
debug-v1.patch (17.13 KB, patch)
2021-03-26 10:34 UTC, darktemplar
Details
imagepath.log.xz (352.01 KB, application/x-xz)
2021-03-26 11:02 UTC, darktemplar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description darktemplar 2021-03-03 12:16:03 UTC
SUMMARY
When a lot of windows is grouped, and textual list of grouped tasks is displayed, plasmashell may work slowly.

STEPS TO REPRODUCE
1. open task manager settings, in "Behaviour" group set "Group:" to "By program name", set "Clicking grouped task:" to "shows textual list".
2. Open 50-100 instances of application. I used 100 instances of "konsole" for that purpose.
3. Ensure there is enough RAM, so swapping and OOM killer wouldn't interfere.
4. If some windows were not moved into same group upon creation in task manager, click on them. When window goes foreground, it's moved into main group on taskbar. I assume it's a separate issue.
4. Click using LMB on grouped window on taskbar.

OBSERVED RESULT
It takes up to a few seconds to show textual list of grouped tasks. And after showing this list, it takes a few more seconds for mouse scrolling or other interactions to start working.

EXPECTED RESULT
Immediate response: immediate appearence of textual list, immediate response to mouse actions, like there were only 2 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: ALT Linux Sisyphus
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I've tried reproducing it on fresh Neon, issue appears there as well. Sometimes it works slower, sometimes it works faster, but if you add more windows and ensure there is enough RAM, issue is still reproducible.

$ sha256sum neon-user-20210225-0945.iso
e914077a3bb85903c03d792fb0e04da466bedfde130e0f6d54f76ebfaaa38bd7  neon-user-20210225-0945.iso
Comment 1 darktemplar 2021-03-03 13:43:32 UTC
I've found out after running callgrind, that function Plasma::SvgRectsCache::loadImageFromCache is called over 50000 times when textual list for a group of 50 windows is displayed.

I've logged every filename passed to this function after start of plasmashell, creating group of 50 windows and displaying it (once or just few times). One of images was loaded over 46000 times.

$ cat plasma.log | awk '{ print $12 }' | sort | uniq -c | sort -h -r
  46277 /usr/share/kf5/plasma/desktoptheme/default/widgets/button.svgz,
   3150 /usr/share/kf5/plasma/desktoptheme/default/icons/media.svgz,
   1052 /usr/share/kf5/plasma/desktoptheme/default/widgets/viewitem.svgz,
   1052 /usr/share/kf5/plasma/desktoptheme/default/icons/window.svgz,
   1051 /usr/share/icons/breeze/actions/32/window-close.svg,
   1050 /usr/share/icons/breeze/actions/32/media-skip-forward.svg,
   1050 /usr/share/icons/breeze/actions/32/media-skip-backward.svg,
   1050 /usr/share/icons/breeze/actions/32/media-playback-start.svg,
    266 /usr/share/kf5/plasma/desktoptheme/default/widgets/tasks.svgz,
    264 /usr/share/icons/breeze/apps/32/utilities-terminal.svg,
     57 /usr/share/icons/breeze/actions/22/media-skip-forward.svg,
     57 /usr/share/icons/breeze/actions/22/media-skip-backward.svg,
     57 /usr/share/icons/breeze/actions/22/media-playback-start.svg,
     57 /usr/share/icons/breeze/actions/16/window-close.svg,
     25 /usr/share/kf5/plasma/desktoptheme/default/widgets/scrollbar.svgz,
     12 /usr/share/icons/breeze/status/22/update-none.svg,
     11 /usr/share/kf5/plasma/desktoptheme/default/icons/system.svgz,
      9 /usr/share/kf5/plasma/desktoptheme/default/dialogs/background.svgz,
      6 /usr/share/kf5/plasma/desktoptheme/default/icons/korgac.svgz,
      5 /usr/share/kf5/plasma/desktoptheme/default/widgets/scrollwidget.svgz,
      4 /usr/share/kf5/plasma/desktoptheme/default/widgets/tooltip.svgz,
      4 /usr/share/kf5/plasma/desktoptheme/default/widgets/tabbar.svgz,
      4 /usr/share/icons/breeze/actions/16/view-history.svg,
      3 /usr/share/kf5/plasma/desktoptheme/default/widgets/lineedit.svgz,
      3 /usr/share/kf5/plasma/desktoptheme/default/widgets/busywidget.svgz,
      3 /usr/share/kf5/plasma/desktoptheme/default/opaque/widgets/tooltip.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/widgets/plasmoidheading.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/widgets/panel-background.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/widgets/line.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/widgets/arrows.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/icons/user.svgz,
      2 /usr/share/kf5/plasma/desktoptheme/default/icons/preferences.svgz,
      2 /usr/share/icons/breeze/preferences/32/preferences-desktop.svg,
      2 /usr/share/icons/breeze/categories/32/applications-system.svg,
      2 /usr/share/icons/breeze/categories/32/applications-office.svg,
      2 /usr/share/icons/breeze/categories/32/applications-network.svg,
      2 /usr/share/icons/breeze/categories/32/applications-multimedia.svg,
      2 /usr/share/icons/breeze/categories/32/applications-graphics.svg,
      2 /usr/share/icons/breeze/categories/32/applications-development.svg,
      2 /usr/share/icons/breeze/apps/48/utilities-terminal.svg,
      2 /usr/share/icons/breeze/apps/48/telepathy-kde.svg,
      2 /usr/share/icons/breeze/apps/32/preferences-system.svg,
      2 /usr/share/icons/breeze/apps/32/hwinfo.svg,
      2 /usr/share/icons/breeze/actions/16/system-log-out.svg,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/pager.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/listitem.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/frame.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/configuration-icons.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/background.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/widgets/action-overlays.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/start.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/printer.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/notification.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/network.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/list.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/klipper.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/kdeconnect.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/input.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/go.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/edit.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/device.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/configure.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/battery.svgz,
      1 /usr/share/kf5/plasma/desktoptheme/default/icons/audio.svgz,
      1 /usr/share/icons/breeze/status/22/redshift-status-off.svg,
      1 /usr/share/icons/breeze/preferences/32/preferences-desktop-wallpaper.svg,
      1 /usr/share/icons/breeze/places/32/folder-favorites.svg,
      1 /usr/share/icons/breeze/actions/22/window-close.svg,
      1 /usr/share/icons/breeze/actions/22/notifications-disabled.svg,
      1 /usr/share/icons/breeze/actions/22/meeting-attending.svg,
      1 /usr/share/icons/breeze/actions/22/edit-clear-locationbar-rtl.svg,
      1 /usr/share/icons/breeze/actions/22/activities.svg,
Comment 2 darktemplar 2021-03-04 13:06:19 UTC
Since files are too large to be attached here, I'm posting links:

http://ftp.altlinux.org/pub/people/darktemplar/kdebug-433907/callgrind.out.4715
http://ftp.altlinux.org/pub/people/darktemplar/kdebug-433907/plasmashell.qml.trace.qzt

First file is an output of callgrind for reproduction test. Second file is a qml trace of another issue reproduction attempt where it's reproduced after second 140 three times.
Comment 3 David Edmundson 2021-03-23 13:42:40 UTC
In plasma-desktop/applets/taskmanager/package/contents/ui/GroupDialog.qml
This many lookups is a sign of something wrong in the calling code rather than the SVG code itself.

It's not written very declaratively, which tends to backfire

My working theory - we trigger an updateSize on animationChanged, updating the size triggers the Flow move animation and that gets exponentially higher the more items you have, as you have more things starting a move. You'll get one move transition per item.

Frankly I can't see the animation anyway.
Comment 4 darktemplar 2021-03-23 15:06:53 UTC
I've made following debug changes and rebuilt plasma-desktop locally:

diff --git a/plasma-desktop/applets/taskmanager/package/contents/ui/GroupDialog.qml b/plasma-desktop/applets/taskmanager/package/contents/ui/GroupDialog.qml
index 802511a08..7706bfaac 100644
--- a/plasma-desktop/applets/taskmanager/package/contents/ui/GroupDialog.qml
+++ b/plasma-desktop/applets/taskmanager/package/contents/ui/GroupDialog.qml
@@ -251,6 +251,9 @@ PlasmaCore.Dialog {
     }
 
     function updateSize() {
+        console.count("updateSize() called");
+        console.log("updateSize called. visible is ", visible, ", visualParent is ", visualParent);
+
         if (!visible) {
             return;
         }

I also enabled logging:

$ cat .config/QtProject/qtlogging.ini 
[Rules]
*.debug=true
qt.*.debug=false

and reproduced issue. I've opened grouped task list twice. Here's resulting part of log:

trying to show an empty dialog
trying to show an empty dialog
updateSize() called: 1
qml: updateSize called. visible is  true , visualParent is  Task_QMLTYPE_395(0x55e846c480e0)
trying to show an empty dialog
updateSize() called: 2
qml: updateSize called. visible is  true , visualParent is  Task_QMLTYPE_395(0x55e846c480e0)

It doesn't look like updateSize is called too often. It's called only once each time grouped tasks list is expanded.
Comment 5 darktemplar 2021-03-26 10:34:47 UTC
Created attachment 137075 [details]
debug-v1.patch

Implemented debug-only changes.
Comment 6 darktemplar 2021-03-26 11:02:59 UTC
Created attachment 137078 [details]
imagepath.log.xz

Patch attached earlier requires boost and private headers of qtbase and qtdeclarative.

Log file generated after creating 100 konsole windows and 1 qterminal window, and running patched plasmashell with:

LC_ALL=C DEBUGIMAGEPATH=1 DEBUGOBJECTS=1 plasmashell -n --replace

After that I expanded konsole group once and replaced plasmashell with instance without debug settings.

It looks like there are thousands instances of FrameSvg and SvgPrivate objects exist at same time. To be more precise, this time I got 8541 simultaneous instances of FrameSvg and 10323 instances of SvgPrivate.

Most qml stack traces looked like one of following 3 variants:

1)
expression for leftPadding (file:///usr/lib64/qt5/qml/org/kde/plasma/components.3/ToolButton.qml:0)
expression for implicitWidth (file:///usr/lib64/qt5/qml/org/kde/plasma/components.3/ToolButton.qml:0)
onContainsMouseChanged (file:///usr/share/kf5/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:350)

2)
expression for visible (file:///usr/lib64/qt5/qml/org/kde/plasma/components.3/private/ButtonContent.qml:0)
expression for horizontalAlignment (file:///usr/lib64/qt5/qml/org/kde/plasma/components.3/private/ButtonContent.qml:58)
onContainsMouseChanged (file:///usr/share/kf5/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:350)

3)
onContainsMouseChanged (file:///usr/share/kf5/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:350)

I tried using qt_v4StackTraceForEngine for obtaining qml stack trace, but it always crashed for me since currentStackFrame is NULL:

https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/jsruntime/qv4engine.cpp?h=v5.15.2#n838

It looks like excessive amount of Plasma::Svg and Plasma::FrameSvg instances is created and destroyed each time this scenario happens.

It went from 119 instances to 4318 instances of Plasma::FrameSvg and from 176 instances to 5276 instances of SvgPrivate::SvgPrivate when showing grouped tasks, and to 8541 instances of Plasma::FrameSvg and back to 259 instances (for Plasma::Svg it went -> 10323 -> 425 instances) after I tried to scroll it using mouse wheel.

I think this has to be optimized somehow.
Comment 7 Bug Janitor Service 2021-03-31 08:22:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/402
Comment 8 Nate Graham 2021-04-06 16:33:43 UTC
Git commit ea84e5c1600dde7207a85dc228eae6cc05d4b319 by Nate Graham, on behalf of Aleksei Nikiforov.
Committed on 06/04/2021 at 16:32.
Pushed by ngraham into branch 'master'.

Replace Repeater with ListView for task group list

Unlike Repeater ListView loads only visible items.
This behaviour leads to huge performance improvement.
ListView also requires to set width and height explicitly.

One remaining issue is time of displaying tooltips.
Tooltips are displayed only for short amount of time.
With Repeater this timer starts after tooltip is displayed.
With ListView it looks like timer starts while ListView is preparing to display,
which may lead to situation when timer fires before tooltip is displayed,
thus when tooltip is ready, it is briefly displayed and immediately hidden again.

M  +10   -14   applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/ea84e5c1600dde7207a85dc228eae6cc05d4b319
Comment 9 Nate Graham 2021-04-07 09:36:18 UTC
*** Bug 429502 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2021-04-07 09:36:30 UTC
*** Bug 430317 has been marked as a duplicate of this bug. ***
Comment 11 Patrick Silva 2021-04-10 14:26:37 UTC
humm, this issue is still reproducible with 50 instances of Konsole on neon unstable. Mainly scrolling through the list of grouped apps is slow.
Both icon-only and normal task managers are affected.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2
Graphics Platform: X11
Comment 12 bugs-kde 2021-04-25 21:39:48 UTC
I can confirm this is not solved and I had to apply my hack in https://bugs.kde.org/show_bug.cgi?id=429502 again to get the smooth experience back.
Comment 13 bugs-kde 2021-04-25 21:42:13 UTC
*** Bug 429502 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2021-05-17 14:08:53 UTC
Git commit 34b978243147cbafd62d9965338b236deb519826 by Nate Graham.
Committed on 17/05/2021 at 14:08.
Pushed by ngraham into branch 'master'.

Revert "Replace Repeater with ListView for task group list"

This reverts commit ea84e5c1600dde7207a85dc228eae6cc05d4b319.

This commit was supposed to fix 433907 but apparently did not do so.
Additionally, it introduced an unpleasant visual flicker for grouped
task tooltips. Let's try again another way.

M  +14   -10   applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/34b978243147cbafd62d9965338b236deb519826
Comment 15 Nate Graham 2021-05-17 14:10:14 UTC
Git commit 152674a5fdf69f8e33ceef09b71e8d67d1595926 by Nate Graham.
Committed on 17/05/2021 at 14:09.
Pushed by ngraham into branch 'Plasma/5.22'.

Revert "Replace Repeater with ListView for task group list"

This reverts commit ea84e5c1600dde7207a85dc228eae6cc05d4b319.

This commit was supposed to fix 433907 but apparently did not do so.
Additionally, it introduced an unpleasant visual flicker for grouped
task tooltips. Let's try again another way.
(cherry picked from commit 4342e6f7eb7d2eb7eb789554a8be2e5d1a8b618d)

M  +14   -10   applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/152674a5fdf69f8e33ceef09b71e8d67d1595926
Comment 16 Patrick Silva 2021-06-04 19:12:14 UTC
*** Bug 428351 has been marked as a duplicate of this bug. ***
Comment 17 Bug Janitor Service 2021-10-21 09:11:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/622
Comment 18 Bug Janitor Service 2021-10-21 13:52:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/623
Comment 19 Fushan Wen 2021-10-21 15:46:18 UTC
Git commit 12373d31a0400bf5d4b7d6abdb29268c360156bf by Fushan Wen.
Committed on 21/10/2021 at 09:10.
Pushed by ngraham into branch 'master'.

taskmanager: Prevent useless component creation/destruction for grouped tooltips

The binding of "model" property of DelegateModel in ToolTipDelegate.qml
will trigger useless component creation/destruction when "rootIndex" is
changed but is not undefined. Make the ternary operator depend on
"hasRootIndex" bool property to avoid that.

In Task.qml, only assign different values to "parentTask" and "rootIndex"
to avoid unnecessary component creation/destruction for the second time
hovering on the same task.
Related: bug 444001

M  +10   -2    applets/taskmanager/package/contents/ui/Task.qml
M  +4    -1    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/12373d31a0400bf5d4b7d6abdb29268c360156bf
Comment 20 Nate Graham 2021-10-21 15:47:30 UTC
Git commit 2f27fc9f05462076a77254c0df17fa07ee8228a8 by Nate Graham, on behalf of Fushan Wen.
Committed on 21/10/2021 at 15:47.
Pushed by ngraham into branch 'Plasma/5.23'.

taskmanager: Prevent useless component creation/destruction for grouped tooltips

The binding of "model" property of DelegateModel in ToolTipDelegate.qml
will trigger useless component creation/destruction when "rootIndex" is
changed but is not undefined. Make the ternary operator depend on
"hasRootIndex" bool property to avoid that.

In Task.qml, only assign different values to "parentTask" and "rootIndex"
to avoid unnecessary component creation/destruction for the second time
hovering on the same task.
Related: bug 444001


(cherry picked from commit 12373d31a0400bf5d4b7d6abdb29268c360156bf)

M  +10   -2    applets/taskmanager/package/contents/ui/Task.qml
M  +4    -1    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/2f27fc9f05462076a77254c0df17fa07ee8228a8
Comment 21 Nate Graham 2021-10-21 17:45:50 UTC
Git commit 818b1b29bc64ccd656a5da2f82fe1aa893d7f8d9 by Nate Graham, on behalf of Fushan Wen.
Committed on 21/10/2021 at 17:44.
Pushed by ngraham into branch 'master'.

taskmanager: Show highlight before ToolTipInstance starts loading for grouped tooltips

For grouped tooltips, if there are many windows in a group, it could
take a long time before all ToolTipInstances are loaded.

Show highlight before ToolTipInstance starts loading to make user feel
less unresponsive.

Note: Will not work when a tooltip is already visible (move directly
from a task to a grouped task)

M  +4    -0    applets/taskmanager/package/contents/ui/Task.qml
M  +7    -2    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/818b1b29bc64ccd656a5da2f82fe1aa893d7f8d9
Comment 22 Nate Graham 2021-10-21 17:46:17 UTC
Git commit 9e1a0670721093b508f1c6722c8c82beb95078b1 by Nate Graham, on behalf of Fushan Wen.
Committed on 21/10/2021 at 17:46.
Pushed by ngraham into branch 'Plasma/5.23'.

taskmanager: Show highlight before ToolTipInstance starts loading for grouped tooltips

For grouped tooltips, if there are many windows in a group, it could
take a long time before all ToolTipInstances are loaded.

Show highlight before ToolTipInstance starts loading to make user feel
less unresponsive.

Note: Will not work when a tooltip is already visible (move directly
from a task to a grouped task)


(cherry picked from commit 818b1b29bc64ccd656a5da2f82fe1aa893d7f8d9)

M  +4    -0    applets/taskmanager/package/contents/ui/Task.qml
M  +7    -2    applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/9e1a0670721093b508f1c6722c8c82beb95078b1
Comment 23 Bug Janitor Service 2021-10-22 15:04:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/631
Comment 24 Bug Janitor Service 2021-10-24 03:50:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/635
Comment 25 Bug Janitor Service 2021-10-24 04:26:56 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/636
Comment 26 Bug Janitor Service 2021-10-24 04:49:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/637
Comment 27 Bug Janitor Service 2021-10-24 11:54:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/638
Comment 28 Nate Graham 2021-10-25 18:46:58 UTC
Git commit d74bdc66117cf85d34eaa5ca24b1954ab0df0ac6 by Nate Graham, on behalf of Fushan Wen.
Committed on 25/10/2021 at 18:46.
Pushed by ngraham into branch 'master'.

taskmanager: Make albumArtBackground in the tooltip load on demand

This is expected to slightly improve the loading speed and the memory
consumption of ToolTipInstance.

M  +19   -26   applets/taskmanager/package/contents/ui/ToolTipInstance.qml

https://invent.kde.org/plasma/plasma-desktop/commit/d74bdc66117cf85d34eaa5ca24b1954ab0df0ac6
Comment 29 Nate Graham 2021-10-26 16:52:58 UTC
Git commit bb18ba6a83ca7abe34aa0018bc5630f4e077ca19 by Nate Graham, on behalf of Fushan Wen.
Committed on 26/10/2021 at 16:51.
Pushed by ngraham into branch 'master'.

taskmanager: Make the player controller load on demand

This is expected to slightly improve the loading speed and the memory
consumption of ToolTipInstance.

M  +75   -70   applets/taskmanager/package/contents/ui/ToolTipInstance.qml

https://invent.kde.org/plasma/plasma-desktop/commit/bb18ba6a83ca7abe34aa0018bc5630f4e077ca19
Comment 30 Nate Graham 2021-10-26 18:59:16 UTC
Git commit 238a076c8d9d80f874f3cbef7ba857db7efda7ac by Nate Graham, on behalf of Fushan Wen.
Committed on 26/10/2021 at 17:49.
Pushed by ngraham into branch 'master'.

taskmanager: Move x11Thumbnail, pipeWireThumbnail, iconItem to the same Loader

As PipeWireThumbnail is available, there is no need to use a separate
Loader anymore.

This is expected to slightly improve the loading speed and the memory
consumption of ToolTipInstance.

D  +0    -20   applets/taskmanager/package/contents/ui/PipeWireThumbnail.qml
M  +41   -29   applets/taskmanager/package/contents/ui/ToolTipInstance.qml

https://invent.kde.org/plasma/plasma-desktop/commit/238a076c8d9d80f874f3cbef7ba857db7efda7ac
Comment 31 Nate Graham 2021-10-26 19:16:45 UTC
Git commit b63a6c9b16f261ecac99e5d1abbd72c52349cb95 by Nate Graham, on behalf of Fushan Wen.
Committed on 26/10/2021 at 19:15.
Pushed by ngraham into branch 'master'.

taskmanager: Replace Repeater with ListView for task group list

Unlike Repeater ListView loads only visible items. This behaviour
leads to huge performance improvement.
Related: bug 444001

M  +2    -14   applets/taskmanager/package/contents/ui/Task.qml
M  +30   -33   applets/taskmanager/package/contents/ui/ToolTipDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/b63a6c9b16f261ecac99e5d1abbd72c52349cb95
Comment 32 Fushan Wen 2021-10-27 02:05:20 UTC
After carefully re-reading the description of this bug, I found the bug is about textual list, but not the tooltip, so it's a mistake that I added "BUG: 433907" in the merge request.

Mark it as REOPENED so future work is needed.
Comment 33 Bug Janitor Service 2021-10-27 02:37:20 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/652
Comment 34 Fushan Wen 2021-10-27 02:44:22 UTC
To really fix the bug, the Repeater in GroupDialog.qml must be replaced with a ListView.
Comment 35 Nate Graham 2021-10-28 16:22:24 UTC
*** Bug 429502 has been marked as a duplicate of this bug. ***
Comment 36 Nate Graham 2021-10-29 17:09:34 UTC
Git commit 3d552a2bfcc7b0f5e03bdeef8fcacdbeea9cf5d6 by Nate Graham, on behalf of Fushan Wen.
Committed on 29/10/2021 at 17:08.
Pushed by ngraham into branch 'master'.

taskmanager: Disable tooltips completely when groupDialog is visible

Setting active property to false only makes the tooltip invisible, but
setting enabled property to false can completely disable the tooltip
from rendering.

This will bring some performance improvement for the textual list,
because when hovering on items in the textual list, the tooltip will be
still rendered without enabled: false.

M  +1    -2    applets/taskmanager/package/contents/ui/Task.qml

https://invent.kde.org/plasma/plasma-desktop/commit/3d552a2bfcc7b0f5e03bdeef8fcacdbeea9cf5d6
Comment 37 Bug Janitor Service 2021-11-13 14:36:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/689
Comment 38 Nate Graham 2021-11-16 01:34:25 UTC
Git commit ec2d3d56a7eb0ac7bd6eb2a3fb86038fad0f000e by Nate Graham, on behalf of Fushan Wen.
Committed on 16/11/2021 at 01:33.
Pushed by ngraham into branch 'master'.

taskmanager: Port PlasmaExtras.ScrollArea to PC3.ScrollView in GroupDialog

1. Port `PlasmaExtras.ScrollArea` to `PC3.ScrollView`, and port `Repeater` to
   `ListView` so only visible tasks are loaded.
2. Rework activeTask mechanism to fit `ListView`, so the highlight can
   be restored after opening the same textual list (`findActiveTaskIndex()`).
3. Drop `updateSize()` function because it's more distinct to use size
   bindings, and the text width is updated by `updateMaxTextWidth()`.
4. Drop `attachModel()` function and set model property directly in
   `ListView`.
5. Add `isGroupDialog` bool property to `MouseHandler` because
   `ListView` uses `itemAt` instead of `childAt` to get the item at the
   cursor position, so drag and drop still works.
6. Several hacks to prevent warning messages, including "Binding loop
   detected" and "trying to show an empty dialog".
7. Add `iconMargin` and `labelMargin`, so those properties can be shared
   between `Task` and `GroupDialog`.

M  +61   -219  applets/taskmanager/package/contents/ui/GroupDialog.qml
M  +7    -1    applets/taskmanager/package/contents/ui/MouseHandler.qml
M  +6    -6    applets/taskmanager/package/contents/ui/Task.qml
M  +2    -0    applets/taskmanager/package/contents/ui/code/layout.js

https://invent.kde.org/plasma/plasma-desktop/commit/ec2d3d56a7eb0ac7bd6eb2a3fb86038fad0f000e