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

            Bug ID: 507802
           Summary: Opening / Loading PDF from Samba share (SMB / CIFS) is
                    very slow
    Classification: Applications
           Product: okular
      Version First 22.12.3
       Reported In:
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: PDF backend
          Assignee: okular-devel@kde.org
          Reporter: sebastian_stei...@gmx.de
  Target Milestone: ---

Created attachment 183754
  --> https://bugs.kde.org/attachment.cgi?id=183754&action=edit
Excerpt from Samba file server log file

SUMMARY

I have the same problem as in bug #327846 but I have no high latency WAN. The
problem affects the LAN as well. The server has a 10 GBit/s uplink and the
client is connected by 1 GBit/s.

I'm on Debian Linux bookworm amd64: okular (4:22.12.3-1)

Example: Opening a PDF file of 160 kB from a Samba share can take up to 10
seconds using Okular. 

While copying the remote file to a local folder runs in less than a second. And
then Okular opens it instantly as well. So it's neither the bandwidth nor the
PDF file. So the problem is the way Okular reads the file from the network
share. 

I enabled verbose logging on my Samba file server. From the debug log file I
can see that Okular seems to read only 256 bytes per Samba request. So even for
a 160 kB file quite a lot of requests seem to be necessary.

As I use krb5p (or at least krb5i) for the Samba mount, there is for sure some
overhead. 

Is it possible to increase the read buffer from 256 bytes to something larger?
Maybe 16384 bytes? 

Of, if RAM is not a problem on the client, Okular might cache the entire file
in memory/RAM and then read/parse the PDF data in small chunks? My laptop has
32 GB of RAM. So I wouldn't mind if Okular would preload even 300 MB large PDF
files to RAM and then examine/load them in-memory.

I'm not sure if the place to fix this is Okular or a KDE PDF or Poppler library
/ component as I'm not familiar with the architecture of Okular or its PDF
backend.


STEPS TO REPRODUCE
1. Mount Samba share with krb5p 
2. Open a 160 kB PDF file on such a share from Dolphin
3. Wait for Okular to open the file

OBSERVED RESULT
Takes 10 seconds to get ready.

EXPECTED RESULT
Opens instantly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 12 amd64
KDE Plasma Version: 4:5.27.5-2
KDE Frameworks Version: don't know / Debian bookworm stable
Qt Version: libqt5core5a (5.15.8+dfsg-11+deb12u3)

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to