SUMMARY I had high CPU usage while "Dolphin" window was opened. Later I figured out that problem was with "size of contents" option which I manually turned on. And specifically with symlink "z:" which point to "/" in "$HOME/.wine/dosdevices/" folder. That symlink Wine creates by default during configuration. STEPS TO REPRODUCE 1. Settings > Configure Dolphin > View Modes > Details. For "Folder size displays" select "Size of contents, up to 4 levels deep" 2. F4 to open terminal 3. Create symlink to "/proc" with command and "ln -s /proc test_size" OBSERVED RESULT Dolphin start eating up to 48% of CPU and at some point will show some strange value like "21,6 PiB" EXPECTED RESULT Probably Dolphin shouldn't inspect symlinks and /proc directory SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: KDE neon User Edition KDE Plasma Version: 5.21 KDE Frameworks Version: 5.79 Qt Version: 5.15.2 ADDITIONAL INFORMATION
FYI the folder size counting takes into account folder hiding, i.e with hidden folders hidden you wouldn't experience this issue.
Activating option "Size of contents, up to 10 levels deep", leads to 100% cpu usage in a seemingly infinite loop (can last hours). Some dirs also report a much overestimated size. On one example, a dir (15 levels, 1045 dir, 41233 files, `du` size of 169 GiB) is reported as 512.2 TiB. Selecting a lower number of levels (2-3) does not trigger the problem (size is underestimated, as expected). The tree might contain circular symbolic links. fs is brtfs. I have not tried browsing /proc and did not create symbolic links there.
Mentioned here: https://old.reddit.com/r/kde/comments/100uo69/dolphin_uses_100_of_each_cpu_core_one_after/
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/485
Git commit 491068a4405f93ce66d4f49fa5ba5dee29e9546b by Fabian Vogt. Committed on 08/01/2023 at 17:18. Pushed by fvogt into branch 'release/22.12'. Don't recurse into symlinks when counting directory contents Symlink contents should not be visited for the purpose of displaying sizes. Not only is potentially misleading because the storage is actually used elsewhere (the target location), it can be completely wrong as contents can be visited multiple times, even recursively. M +3 -9 src/kitemviews/private/kdirectorycontentscounterworker.cpp https://invent.kde.org/system/dolphin/commit/491068a4405f93ce66d4f49fa5ba5dee29e9546b
Git commit a81b287e7af7db24ff26a659fe599e5a8b290bd1 by Fabian Vogt. Committed on 09/01/2023 at 15:21. Pushed by fvogt into branch 'master'. Don't recurse into symlinks when counting directory contents Symlink contents should not be visited for the purpose of displaying sizes. Not only is potentially misleading because the storage is actually used elsewhere (the target location), it can be completely wrong as contents can be visited multiple times, even recursively. (cherry picked from commit 491068a4405f93ce66d4f49fa5ba5dee29e9546b) M +3 -9 src/kitemviews/private/kdirectorycontentscounterworker.cpp https://invent.kde.org/system/dolphin/commit/a81b287e7af7db24ff26a659fe599e5a8b290bd1