sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.72k stars 1.73k forks source link

Unnecessary file reads on PDF files stored in a Server Message Block #4635

Open FOSSPCM opened 2 days ago

FOSSPCM commented 2 days ago

SumatraPDF version 3.5.2

Describe the bug If a file server contains a PDF file, and a client opens the file on the server with Sumatra PDF, Sumatra PDF makes repeating file read calls to the file stored on the server, non-stop, which stresses the server.

To Reproduce Steps to reproduce the behavior:

  1. Have a PDF file stored on a file server using Server Message Block.
  2. On a client computer running Windows with Sumatra PDF installed, connect to the file server in File Explorer or whatever file manager of your choosing.
  3. Go to the directory where the PDF file is stored.
  4. Open the file.

Sumatra PDF appears to open the file as normal, but repeat the same steps but with Process Monitor or something like unto it running on the client prior to opening the PDF. You can filter results by process name in Process Monitor, that'll make it easier to see. Open the PDF file again and notice how often Sumatra PDF does something with the file (Open File actions mainly, even though the file is already open).

Expected behavior When opening the PDF file, it should only read once. Sumatra PDF does this for PDF files stored locally.

Screenshots I'll add some soon, I'm away from the server at the moment. I just remembered to write this bug report now.

Additional context Sumatra PDF will only open a file once if it is stored on a computer locally. This bug only affects reading PDF files on a Server Message Block. I tested this with Firefox, and Firefox will open PDF files stored on SMB as normal.

Anyway, love the work you put into Sumatra PDF, and I'm looking forward to 3.6! If you need any more information, let me know!