[dolphin] [Bug 499551] Dolphin hangs when opening context menu for directory with many files or for a huge file selection

Méven bugzilla_noreply at kde.org
Thu Feb 6 09:22:02 GMT 2025


https://bugs.kde.org/show_bug.cgi?id=499551

Méven <meven at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REPORTED                    |CONFIRMED
                 CC|                            |meven at kde.org
     Ever confirmed|0                           |1

--- Comment #7 from Méven <meven at kde.org> ---
(In reply to Andrea Ippolito from comment #6)
> Comment on attachment 178009 [details]
> flamegraph

Very Nice that's helpful.
> 
> this is while opening the context menu on a directory containing 30k 4KB
> .bin files generated with:
> 
> #!/bin/bash
> 
> dd if=/dev/urandom of=/tmp/file-gen/file-random-0.bin bs=4K count=1
> iflag=fullblock
> for i in $(seq 1 30000);
> do
>     cp /tmp/file-gen/file-random-0.bin /tmp/file-gen/file-random-$i.bin
> done

You are missing some debug symbols but that's interesting already.
We can see the time is spent by the context menu plugin slideshowfileitemaction
which is part of gwenview and not enabled by default IIRC.

It is clearly due to:
https://invent.kde.org/graphics/gwenview/-/blob/master/app/slideshowfileitemaction.cpp?ref_type=heads#L49

There are no images in the folder and the files are of random type.
This can be optimized, it uses `db.mimeTypeForFile` which opens files when it
can't determine the mimetype by extension.
It should use filename extension only.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list