Zotero search is slow and unusable inside of PDF documents

edited 21 days ago
Hello,
Problem 1:
The search function inside a PDF file is not working and it consumes a lot of RAM (3-4 GB) and a considerable amount of CPU (15-20%)

Description of user interface: When I open a PDF (whether it's a small or big one in term of pages and/or size) and search for a key word the search takes forever (the word count increase in small increments with a big interval of time between them, and even when I press enter I can not view the few search results) and at the same time all of the PDF's page turn to a loading icon when I press enter, the problem persist even when I scroll the document or exit search

Things I tried that didn't work:
- Restarting in troubleshooting mode
- Disabling Hardware acceleration

PS: When I try opening a PDF (I tried the same documents and different ones) in Zotero 6 and use the search function I do not encounter the same issues (the search is smooth is instantaneous all of the pages load fast)

I use Zotero 7, not plugins installed
PC configuration (Windows 11 64 bit): RAM 16 GB, CPU: AMD Ryzen 7 7735HS
Debug ID: D1673963239

Problem 2:
Pages load slow when I open a PDF (whether it's a small or big one in term of pages and/or size) and try use the scroll bar to jump pages or scrolling fast using the mouse and the same thing happens with when I enter a specific page number (It's slow by a few seconds but not as slow as the search function which it takes forever)
PS: scrolling in Zotero 6 is much smoother
Debug ID: D505850834
  • I am experiencing the same issues on a MacBook Pro M1 Max.
  • @nonchalant.se @fronbasal

    Does this happen with all PDF files?
  • With larger PDF files specifically, I can’t seem to search for anything. The reader will turn entirely black/white and then the view “crashes” (i.e. remains unresponsive and I’ll have to re-open the document).
  • @fronbasal

    Could you send an example PDF file to support@zotero.org with a link to this thread?

    Also could you provide a Debug ID for it happening?
  • Dear Martynas,

    after investigating further - and waiting for ~3 minutes - I can verify the pages do indeed load slowly and the search does have performance issues but this is easily explained by the large size of the document and the absence of a search index.

    After due consideration I believe this is only an optimization issue, not a bug per se.

    There is no error log in the console and the page as well as the search highlight does load after a while.

    Maybe adding a more prolific / eager search index as a plugin for certain PDFs could be a sane way to go about this. Unsure weather this is a feature every Zotero user would need.

    Thank you!
  • Same on Manjaro Linux using Zotero v7.0.8.
    Search in PDFs takes quite some time. Nevertheless I didn't experience any crashes so far.
  • Once again, do you have a file that performs worse on Zotero 7 compared to Zotero 6?
  • edited 14 days ago
    @martynas_b try the PDF from here: https://github.com/janishar/mit-deep-learning-book-pdf/tree/master/complete-book-pdf

    I searched for the word 'first'.
    Zot7 average on 3 runs, no plugins: 40sec
    Zot6: 24sec
    Firefox: 7sec
    Chrome: 7sec
    Edge: 35sec (wow, this surprised me. maybe it's all the browser plugins??)

    I'm on Win11. Zot7 also takes much more memory compared to Zot6.

    Another issue I've had on Zot7 is very very rarely some files will never find ANYTHING with search in PDF. Debug shows nothing either. When I open Zot6 and open the file, search finds without issues and afterwards the file also works in Zot7. I've only had this happen twice and could not reproduce however.
  • The issue of search blocking page rendering is fixed. The search is still a bit slow, but we’ll work on improving it.
  • Same performance issue here.
    I am using Zotero 7.0.8 (64-bit).

    Search for one word in a 600-page 3.5MB pdf took:
    35s in Zotero
    6s in Evince (GNOME Document Viewer)

    Also, page rendering sometimes lags in Zotero.

    Specs:
    Ubuntu 24.04.1 LTS
    i5-5300U
    8GB ram
  • @przespolewski.kamil Can you reproduce that in Zotero 7.0.9?
  • @martynas_b I have reproduced the same search in two versions:
    30s in Zotero 7.0.9 (64-bit)
    12s in Zotero 7.0.0-beta.39+ecba25be0 (64-bit)

    Thank you for your time :)
Sign In or Register to comment.