Bug 474423 - Thumbnailing files added to clipboard can consume excessive resources, especially when the clipboard contains many large files
Summary: Thumbnailing files added to clipboard can consume excessive resources, especi...
Status: RESOLVED DUPLICATE of bug 496453
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 5.27.7
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-11 20:06 UTC by David Korth
Modified: 2025-02-27 04:07 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Korth 2023-09-11 20:06:06 UTC
SUMMARY
I was using Dolphin to move around a lot of image files using the clipboard. (cut, paste, etc) I needed to restart Plasma for whatever reason, and on doing so, Plasma was not only acting very slow, it was eating up gobs of memory. (up to 32 GB!) After a bit of diagnosis, I eventually found that the clipboard history in ~/.local/share/klipper/history2.lst contained a full list of all of the files I was moving around. This in itself isn't a problem, but it seems that when the Clipboard applet starts up, it attempts to thumbnail all of the files all at once, resulting in massive slowdown and significant memory usage. Deleting history2.lst allowed Plasma to start up normally.

STEPS TO REPRODUCE
1. Cut 1,000+ high-resolution images from one directory.
2. Paste them in another.
3. Restart plasmashell.

OBSERVED RESULT
Plasma's start is slow, the UI is laggy, and it's eating up gigabytes of memory.

EXPECTED RESULT
Plasmashell starts up and does not use significantly more memory than usual.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux 2.13
(available in About System)
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.110
Qt Version: 5.15.10

ADDITIONAL INFORMATION
There's a related bug https://bugs.kde.org/show_bug.cgi?id=466589 that mentions a memory leak in QWaylandClipboard. I'm using Gentoo's qtwayland-5.15.10-r4 package, which has this patch already applied.
Comment 1 David Korth 2023-09-12 13:45:42 UTC
Sidenote: It was implied with my mention of QWaylandClipboard, but I should explicitly state that I'm using the Plasma Wayland session.
Comment 2 Fushan Wen 2025-02-27 04:07:05 UTC
*** This bug has been marked as a duplicate of bug 496453 ***