Bug 499595

Summary: Ark plugin considerably slows down opening of Dolphin context menu when working on a large number of files
Product: [Applications] ark Reporter: Andrea Ippolito <andrea.ippo>
Component: pluginsAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: REPORTED ---    
Severity: normal CC: rthomsen6
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=499551
See Also: https://bugs.kde.org/show_bug.cgi?id=499551
https://bugs.kde.org/show_bug.cgi?id=499806
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on:    
Bug Blocks: 499806    
Attachments: flamegraph

Description Andrea Ippolito 2025-02-06 13:44:43 UTC
Create lots of files, size doesn't matter as long as they're a lot, e.g.

#!/bin/bash

mkdir -p /tmp/file-gen
dd if=/dev/urandom of=/tmp/file-gen/file-random-0.bin bs=4K count=1 iflag=fullblock
for i in $(seq 1 100000);
do
    cp /tmp/file-gen/file-random-0.bin /tmp/file-gen/file-random-$i.bin
done

Browse to /tmp/file-gen with Dolphin, then select those files with Ctrl+A and right click to create a .tar archive out of this selection.

Expected result: context menu appears in a reasonable time
Actual result: context menu takes more than 10 or 20 seconds to appear

Disabling the Ark context menu entries causes the context menu to appear instantly even on a 100k file selection, which makes me think it's the culprit.

I mentioned this also in https://bugs.kde.org/show_bug.cgi?id=499551

System info:

Operating System: openSUSE Tumbleweed 20250204
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.13.1-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon 780M Graphics
Memory: 30.7 GiB of RAM
Graphics Processor: AMD Radeon 780M
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A7
Comment 1 Andrea Ippolito 2025-02-06 13:51:01 UTC
Created attachment 178018 [details]
flamegraph

long time to see the context menu
long-ish time between clicking on Compress -> Compress to... and finally seeing Ark's UI
long-ish time between confirming .tar creation in Ark's UI and Ark completing the task