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

Méven <me...@kde.org> changed:

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

--- Comment #7 from Méven <me...@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 watching all bug changes.

Reply via email to