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

Andrea Ippolito bugzilla_noreply at kde.org
Thu Feb 6 09:52:12 GMT 2025


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

--- Comment #9 from Andrea Ippolito <andrea.ippo at gmail.com> ---
(In reply to Méven from comment #7)
> (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.

Hey! That's some quick reaction and investigation, thanks :)

Indeed as soon as I disabled that context menu entry (and restarted dolphin),
the context menu opened instantly on the directory.

This entry must come from my distro (opensuse tumbleweed), because I haven't
customized the context menu entries, and also it comes back if I click on the
"Defaults" button.

I don't know if that improvement on the gwenview plugin is something you can
report, or if I have to file a separate bug for that (it's just that a bug
filed by me would probably just be a link to some comments we exchanged here,
while maybe you can provide more useful info - although these comments are
probably enough already to get the ball rolling? Please let me know, np for me
to file another bug :) )

Now another point I want to mention though is that disabling that entry still
doesn't solve the problem when invoking the context menu on the "select all"
file selection, which still takes long. I'm collecting a dump/flamegraph for
this as well, and will report back.

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


More information about the kfm-devel mailing list