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

            Bug ID: 506697
           Summary: xdg-desktop-portal-kde file dialogs cause applications
                    to become unresponsive for several seconds for
                    'obscene large' directories
    Classification: Plasma
           Product: xdg-desktop-portal-kde
      Version First 6.4.2
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

Created attachment 183020
  --> https://bugs.kde.org/attachment.cgi?id=183020&action=edit
perf report --stdio -g graph,8 --sort comm,dso -i xdgdp.profile.raw | c++filt

Here's an outline of what I _suspect_ is happening based on the circumstances. 
The use case is a filesystem 'directory' as a database for uniquely storing
files by human-readable filenames.  I am very aware that there are far too many
files, to the point that overlayfs is used to make a union of several
directories.  This is an extreme case that happens to expose an inherent design
flaw that most probably don't realize is a flaw due to far less files where
things are saved / loaded.  My case happens to involve ~16000 files in the
union folder.  Sadly there isn't a better way of keeping them unique based on
the key that is a filename, any other interface would at least require
duplicate network transfers when a unique name already exists and they'd be
avoided.

STEPS TO REPRODUCE:

1. Have 'many thousands' of non-trivially big files of various sorts in a
catalog that is one logical folder.  OverlayFS use optional.
2. Use xdg-desktop-portal-kde (E.G. from Firefox with the config values to
force the use of KDE's desktop-portal) to try to save a file.

OBSERVED RESULT
3. Watch firefox (or application) freeze for _several tens of seconds_ as every
file is Statted and Mime Type checked, etc for the tree view dialog updates.


EXPECTED RESULT
Save the file and also ABORT ALL DIALOG UPDATES
Bonus result: only stat / update files that match or contain the filename.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.1 (with updated xdg-desktop-portal-kde for debug
symbols download)
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.4-arch2-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION

I saved _two_ files during this capture.

perf report --stdio -g graph,8 --sort comm,dso -i xdgdp.profile.raw | c++filt

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to