[Zotero 7][BUG] - High CPU usage when annotating

I am on a Linux OS (ArchLinux) and using Zotero 7.0.0-beta.54+6b996d4f9 (64-bit). I mostly use an external Wacom tablet when annotating PDFs.

When I try to annotate a PDF using the draw tool the CPU usage skyrockets at 100%.
Sometimes, if I am writing too fast, I also encounter some error like

'Error(s) encountered during statement execution: UNIQUE constraint failed: items.libraryID, items.key [QUERY: INSERT INTO items (itemID, libraryID, key, clientDateModified, itemTypeID, dateAdded, dateModified) VALUES (?,?,?,?,?,?,?)] [PARAMS: 5489, 1, "5JRRRCQ4", "2024-02-01 17:43:40", 37, "2024-02-01 17:43:40", "2024-02-01 17:43:40"] [ERROR: UNIQUE constraint failed: items.libraryID, items.key]'

I also used the 'Check Database Integrity' tool, and it reports no error.

I tried to switch to a lower resolution, but the CPU footprint is still the same.
  • Can you provide a Debug ID for reproducing this?
  • Here it is
  • @dstillman let me know if there's something else I can do to help debugging the issue.
  • @tigerjack Can you reproduce the high CPU usage with all third-party plugins disabled?
  • @martynas_b I tried it, and the result is the same. Check the new debug ID D2108892931.
  • @tigerjack According to the debug log, the plugins appear to still be enabled.
  • @martynas_b strange. I disabled them again and restarted in Safe Mode. The debug ID is D977401783.
  • @martynas_b just to check if the debug output was ok.
  • The reason for this issue remains unclear. It might be related to specific characteristics of your system that influence this behavior. Could you conduct further testing to narrow down the cause? For instance, does the slow drawing occur consistently, or is it limited to particular scenarios, such as drawing with a mouse versus using a tablet?
  • @martynas_b I confirm that the CPU reaches 100% with either trackpad, mouse or the Wacom tablet.
    I tried with both the external Wacom screen and the built-in screen of my laptop.
  • Can you tell more about your system? For example system specifications and anything else that is untypical.
  • I don't know if something is untypical.
    I have an ArchLinux OS with Wayland.
    What else can be different?
  • Could you provide the hardware specifications?
  • CPU: Intel Core i7-10510U (1.80/4.90 GHz, 4 core/8 thread, 8 MB L3, 15 W).
    GPUs: Intel UHD Graphics 620 + NVidia GeForce GTX 1650 Max-Q 4 GB GDDR5.

    I am not using the Nvidia GPU most of the time though.
  • 1) What's your screen resolution?
    2) Does it lag when you keep the mouse pressed and draw, or just after releasing it?
    3) Is there a performance difference between short and long lines?
  • 1) 1920x1080@60Hz
    2) It does not lags, but the CPU goes straight to 100% as soon as I start drawing (not when I release the mouse, but while drawing).
    3) Yeah it seems that drawing short lines does not increase the CPU usage so much. Not sure of it though, since I remember that once the CPU went straight to 100% right after selecting the Eraser button.
  • So, you're not experiencing any lag with Zotero at all, only noticing that a single CPU core's usage spikes to 100%. Is that accurate?
  • That, plus the extremely high CPU temperature. Additionally, the issue does not happen on iPads.
  • All right, we'll try to investigate whether we can make ink drawing more CPU efficient. But you should likely get high cpu usage when dragging note annotation or resizing a highlight annotation as well. Is that correct?

    The database error you mentioned is a separate issue. How often do you experience it?
  • Nope, when I drag notes or resize them, the CPU stays at 15-25%. The spike is only related to the pencil and eraser tools.

    For the database issue, I think it's just a matter of how fast do I write. I am not consistently using Zotero to draw notes anymore because of the CPU usage, but anyway, it was not so frequent before.
Sign In or Register to comment.