vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
643 stars 90 forks source link

Slow loading of first pdt page #207

Closed haji-ali closed 1 year ago

haji-ali commented 1 year ago

Describe the bug After updating to latest version of pdf-tools, I am noticing a considerable delay in loading the first pdf page whenever I open a pdf file or switch to already open one (that I haven't switched to in some time).

Steps to Reproduce the behaviour Steps to reproduce the behaviour:

  1. Open any pdf page
  2. The raw pdf file is displayed (the mode is already PDFView though).
  3. A second or 2 later, the pdf page appears

What is the expected behaviour? In earlier version, the pdf page would appear instantly and I wouldn't see the raw pdf file.

Desktop

Your pdf-tools install

Package pdf-tools is available.

     Status: Available from nongnu -- Install
    Archive: nongnu
    Version: 1.0.0
     Commit: 96703b2bb5c937afd05778086c43280b0593fe99
    Summary: Support library for PDF documents
   Requires: emacs-26.3, tablist-1.0, let-alist-1.0.4
    Website: https://github.com/vedang/pdf-tools/
   Keywords: files multimedia 
 Maintainer: Vedang Manerikar <vedang.manerikar@gmail.com>
     Author: Andreas Politz <mail@andreas-politz.de>

I've noticed this behaviour even without any of my custom configuration.

Additional context I am happy to provide additional context/profiling if someone can point me out to the function/timer that loads the pdf page.