Zotero Reader rendering too slow

## Problem

The reader of Zotero seems to be rendering the PDF too slow. It always takes a few seconds to render the PDF after I try to scroll quickly for a large PDF file.
This is not a problem when I use other PDF readers like Adobe Acrobat Reader or PDFgear.

The video in [GitHub issue](https://github.com/zotero/zotero/issues/4809) shows the problem.

## Environment

- Zotero version: 7.0.9-beta.5
- Hardware: Mac mini M2
- Operating system: MacOS 15.1
  • Can you email the PDF in question to support@zotero.org with a link to this thread?
  • edited 17 days ago
    @fanchengyan It seems that even moving the scrollbar lags for almost a second in the video… Please test again after doing the following two things:

    1) Disable all third-party plugins.
    2) Check if Settings → Advanced → Config Editor → layers.acceleration.disabled value is set false?
  • Disable all third-party plugins slightly improved the performance, but the lag still exists. The default value of layers.acceleration.disabled is false, and I changed it to true will make the performance worse. I have to using other PDF viewer to read the long PDF file currently.
  • I second this - Large PDF file but all other PDF readers handle it fine. Very slow to render the pages
  • @fanchengyan I noticed in the video that sync is running. It can affect reader performance. Can you make another video with finished sync, disabled plugins and, of course, layers.acceleration.disabled set to false?

    @mdugganmrcvs Could you send an example file to support@zotero.org with a link to this thread?
    Also can you provide a Debug ID for it happening?
  • @martynas_b unfortunately due to copyright restrictions I cannot share the PDF but the file size is 202.6mb and whilst it has been really slow over the last week I have just tried to recreate it and it seems to be rendering much better. I should also say I am using a brand new MacBook Pro M3 with 18GB of RAM so the computer is well able.
  • @mdugganmrcvs Sure, no problem.

    1) Is it a scanned document?
    2) Is this the only PDF in your library that is slow?
    3) Could it be that sync was running at the time?
  • No it is a proper professionally produced, high quality PDF with chapters indexed etc. totalling 1900 pages
    No there are multiple PDFs which are behaving similarly some smaller some the same size
    I checked to see if sync was running and sometimes it was and sometimes it wasn't
  • @mdugganmrcvs: If you'd like us to investigate, I'd encourage you to share the file with support@zotero.org with a link to this thread. You don't have to share it publicly, and we obviously won't share it further — we treat materials submitted for troubleshooting the same as any other private data, such as any library data and files synced with our servers.
  • edited 15 days ago
    Hi @martynas_b @dstillman

    For this new video, I have disabled sync and plugins, and ensured layers.acceleration.disabled to be false. The lagging issue still exists.

    The new video is available at: https://github.com/zotero/zotero/issues/4809#issuecomment-2464655983

    The PDF file used in the video has been sent to support@zotero.org via email, which titled "[Zotero Forums] dstillman commented on Zotero Reader rendering too slow"
  • @fanchengyan I see that even the scrolling is lagging right? Zotero reader can sometimes be slower to render pages, but if the scrolling lags, that's weird and likely the reader isn't the main problem here.

    Do you experience lag in other parts of the UI, such as the library tab or notes?

    Also please provide a Debug ID for it happening.
  • Hi @martynas_b

    Yes, the scrolling is lagging heavily for the large PDF file. This issue is not such severe for the small PDF file, but still noticeable sometimes.

    I don't experience lag in other parts of the UI. All other parts of the UI are working fine. Besides, I have tried to open the same large PDF file in the my Windows computer, and the scrolling is smooth. So I think this issue is related to the Zotero reader on the Mac.

    I have enabled the debug logging and tried to scroll the large PDF file in the reader. And I found that Each time I scroll the PDF file, the debug logging will show the following lines. If I scroll the PDF file several times quickly, the debug logging will only add the following lines one time. But if I scroll the PDF file slowly, the debug logging will add the following lines each time I scroll the PDF file. This may be related to the reason for the lagging issue. Here are the lines added to the debug logging each time I scroll the PDF file:

    ===============================================
    (3)(+0000378): Notifier.trigger('modify', 'setting', [1/lastPageIndex_u_VLLV85CA], {"1/lastPageIndex_u_VLLV85CA":{"changed":{"value":107}}}) called [observers: 8]

    (4)(+0002259): UPDATE syncedSettings SET value=?, synced=? WHERE setting=? AND libraryID=? ['103', 0, 'lastPageIndex_u_VLLV85CA', 1]

    (3)(+0000063): Notifier.trigger('modify', 'setting', [1/lastPageIndex_u_VLLV85CA], {"1/lastPageIndex_u_VLLV85CA":{"changed":{"value":105}}}) called [observers: 8]

    (4)(+0001249): UPDATE syncedSettings SET value=?, synced=? WHERE setting=? AND libraryID=? ['102', 0, 'lastPageIndex_u_VLLV85CA', 1]

    (3)(+0000010): Notifier.trigger('modify', 'setting', [1/lastPageIndex_u_VLLV85CA], {"1/lastPageIndex_u_VLLV85CA":{"changed":{"value":103}}}) called [observers: 8]
    ===============================================

    Here is the corresponding Debug ID: D245393086 and D1115779859.
  • Submitted the file and debugging ID (D384054156) to the email as per requested!
    Thanks for your help. Hopefully we can find a solution.
  • @mdugganmrcvs I can only reproduce the rendering slowdown when rapidly scrolling through pages. Is this the issue you're experiencing?

    Also, you should check if disabling third-party plugins has any effect.

    Zotero Reader is slightly slower than Firefox 115 (on which the current Zotero version is based) and noticeably slower than the latest versions of Firefox. We can expect improved performance in future Zotero versions.
  • I have the issue mostly when scrolling quickly but I wouldn’t describe it as being unusually fast. Preview in Mac is able to cope with significantly faster scrolling as is Adobe which is why I find it odd that Zotero can’t. The render time today has been particularly slow.
  • In my experience, slow rendering is almost always due to the compression method of the pdf. JPEG is by far the fastest, but files size is lousy. JPEG2000 used to be really slow, but the new PDF.js in Zotero has improved that a lot; however, JBIG2 is still comparatively very slow and masks also slow down the renderer. If your pdf is just text, you may also try converting to B/W.
  • @martynas_b
    I have shared a video to the email address showing how the rendering lag occurs when scrolling and using the bookmarks.

    The PDF is already in greyscale @matthew-hu but I have the same issue on colour and b&w. It is a real shame I love Zotero but this is making it unusable at times.
  • @mdugganmrcvs Is there a difference if you disable all third-party plugins?
  • @mdugganmrcvs Also the high number of annotations could potentially impact performance. How many annotations do you have in that file? Would it be possible to export the PDF with all annotations and share it with us?
  • @martynas_b
    The file has a lot of annotations I will export and share with you. I have just noticed that zotero is using an insane amount to the tune of almost 34GB. I tried to run a debug at the same time but Zotero just crashed.
  • PDF w/ Annotations just emailed.
    Thanks again for all your help
  • @mdugganmrcvs But again, have you tried with all third-party plugins disabled? Extremely high memory usage is often related to plugin issues.
  • @martynas_b sorry I missed your comment above about that. Yes I have - infact I deleted them all as I had some Z6 ones that were no longer compatible. I have since reinstalled Better Notes the issues relating to rendering were evident in all scenarios. The memory usage issue I have only noted for the first time this morning.
Sign In or Register to comment.