High memory usage from note editor

This discussion was created from comments split from: Extremely high memory usage in MacOS.
  • Hello!
    I've also been struggling with some very high Zotero memory usage in MacOS, leading to slow responses and buffering or freezing when I was adding annotations or highlighting.

    It would often run somewhere between 2.5–4 GB with weird spikes.
    Memory usage isn't very consistent with the pdf documents I was using. Sometimes it responded very quickly and had stable memory usage when lots of PDFs were open, including large and heavily annotated documents; other times, the app really struggles when I try to read one smaller document (c. 8 pages?).

    I've been restarting often; earlier today I disabled the only two plugins I had installed (Better Notes and Better BibTex) in case this was the issue. Only today did the memory usage go so high as to take up my entire system memory (18.34 GB ish) and I had to force-quit the app.

    Would be happy to help in any way to try and figure this out!
  • @k4713: We would need something reproducible — a specific set of steps after Zotero start, with specific files open, to trigger very high memory usage. I don't think we've never seen anywhere near 18 GB of memory usage without plugins being involved. To be clear, you have to restart after disabling plugins for it to be relevant.
  • edited yesterday at 1:38pm
    @dstillman thank you, I'm happy to provide as much documentation as possible.

    I had restarted both Zotero (force quit and reopened the app, as well as regular quit and opened the app) and my macbook since disabling the plugins, which is why I found this high memory usage so unusual.

    Whilst I've been struggling with the lag/memory usage for a while, needing to force-quit the whole app because of a huge memory usage has never happened before.

    I'm not super familiar with this sort of thing so I am not entirely sure what I need to provide. Do you need the specific PDF file I was reading?

    Here are the steps I took as far as I can remember:

    1. Opened Zotero version 7.0.15
    2. Opened a PDF from the associated record in my library. It was downloaded from . The PDF was a linked attachment. Before the restarts, I had changed Zotero's PDF reader to my system default (not Preview, an app called PDFGear).
    3. Created an attachment note under the associated record, began typing in alongside reading the PDF; I was editing the note in a separate window.
    4. After some time, I got a notification from my system telling me I had to force quit one of my current apps as there was no system memory left, and Zotero was on 18 ish GB. I tried to screenshot the window as evidence, but everything was freezing up/buffering a lot so it doesn't seem to have worked.

    I only had Activity Monitor, Firefox, Zotero and PDFGear open; I wasn't running anything intensive or high memory requirement in those tabs and their memory usage was much lower.


    I'm able to replicate this now: I set up the same process, and starting from a baseline of 750 MB memory for Zotero, typing in the separate note window has rapidly increased memory usage to 7.20 GB. I haven't annotated or highlighted the PDF any further, only scrolled relatively slowly; and scrolling through the PDF before I began typing in the note did not increase memory usage.

    The main Zotero window was minimized through all of this as well. I have now closed the annotated note, but the memory usage has not decreased, just stayed consistent at 7.20 GB. Quitting the PDFGear app has not reduced memory usage. Memory increased to around 7.25GB, then dropped to around 7.16 GB slowly after I switched which record I was focused on in my library but has remained consistent since.

    I realise that I'm not very technically literate so I'm not super sure what type of information to provide or the easiest way to provide it, so if there are instructions/guidelines for how to do so I would be happy to follow them.

    Thank you!
  • edited yesterday at 1:40pm
    @k4713: Wait, so this is just using the note editor? You're not using the built-in PDF reader?

    Can you provide a Debug ID for Zotero startup through reproducing this (before Zotero crashes or has to be force-quit), using the "Restart with Logging Enabled…" option?
  • @dstillman yes; this is just the note editor, not the built-in PDF reader.
    I only switched to an external PDF reader yesterday to try and reduce memory usage.

    I will try and provide a Debug ID now; I have enabled a restart in debugging mode and will try to reproduce it again.
  • @dstillman I replicated the issue again. Thank you for your help.

    Debug ID is:

    D747715647

    The max memory use this time was about 3.42 GB when I decided to submit the debug log. I had force quit everything after replicating it the first time, so I had to start again. The memory usage seemed to increase most dramatically when I was actually typing in the note, although it did increase a tiny amount for a few minutes when I didn't input anything.

    I've taken screenshots of the increasing memory usage as tracked by Activity Monitor for both of these replications if that would be useful.
  • If you right-click → Duplicate Item on the note, edit the copy of the note to remove the five embedded images, and then restart Zotero, can you reproduce the memory usage in the copy of the note without the images?
  • Earlier today, I posted a comment about my own experience with very high memory usage on macOS.
    https://s3.amazonaws.com/zotero.org/images/forums/u107415/x2kyfo2jxknlmxs96q0u.png
    I'm pretty sure I successfully submitted it, but it seems to have disappeared. Not sure what went wrong. Is there a way of recovering it?

  • Yeah, it was there -- I assume dstillman meant to split it into a new thread because it's not related to the note editor (and likely related to the scite plugin)
  • I checked whether it was moved into a thread of its own but it has entirely disappeared from both "Your Discussions" and "Participated". I cannot find it.

    I now also saw the email version of your response. I'll try to identify which plugin is responsible. I don't think its the scite plugin but more likely the "Zotero Reference" plugin or something like that. Or did the logs point to the scite plugin?
Sign In or Register to comment.