sumatrapdfreader / sumatrapdf

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

Freezes When Saving Annotations #4364

Open Provincials opened 3 days ago

Provincials commented 3 days ago

Version

Description Whenver I open large PDF, and save my annotations, the software always freezes for about one minute.

To Reproduce

  1. Open a large PDF(mine is 241 MB)
  2. Create one annotation, squiggly/staightline/highlight, whatsoever
  3. save it to current PDF
  4. See error

Expected behavior It should not freeze when saving annotations.

Screenshots Can‘t do it, because my pc crashes then due to the bug

kjk commented 3 days ago

Is the file on a network drive or DropBox / OneDrive etc.?

I think I made some improvements in pre-release so please give it a try.

That being said, 241 MB is a very large file so just saving it to disk takes time.

GitHubRulesOK commented 3 days ago

@Provincials Whist in theory adding a line to the end of the file could be fast the WHOLE file needs to go through several checks, many outside SumatraPDF control.

The total length of the old file PLUS the addition need to be transfered to a new hard disk area even if its save to same file. That means it is down to speed of local disk writer (always avoid edits to non local disks for many reasons including corruption in communications and interference by synchronisation applications)

Even if it is a high speed solid state hard drive, the Antivirus will likely be looking for a PDF exploit even if it tested the file before a personal edit !!

Finally the OS (windows) has to transfer the new or old file name to the saved sectors and flag the old disk sectors as redundant or released before saying the file is now completed.