Writer is slow to update zotero citations on my T14 G1 AMD laptop

Hi,
I have been using zotero in writer for some years and have been satisfied so far. Until now I’ve used intel CPUs with a debian based distro called Parrot OS and have resonable performance on them compared to their general performance in office apps.

When I bought a Lenovo T14 Ryzen 4650u 24gb RAM I found the update of citations has severely been slowed down compare to my intel systems. I ran geekbench on my desktop i5-9600k 32gb RAM and the T14 and found their single core performance to be comparable (T14 got 1515 i5 got 1617 points). But updating citations in libre office takes 10 times longer on the T14 compared to the i5.
I first contacted zotero support who debugged as far as they could go and concluded it was:

So the possible cause of the slowness is Java VM running in LibreOffice, LibreOffice itself and actually perhaps the TCP socket communication between LibreOffice and Zotero, although you would likely see it being slow on your Intel installations too.”

Link: Ryzen laptop shockingly slow citation update - Zotero Forums

Resetting the user profile helped briefly but it seems like the citation update sometimes slow down again.

Is there a procedure I can follow to try and debug to see if the problem could be in libre office?

Thanks in advance!
Edited:
Extra information
The T14 is running Linux 6.0.0.12 in distribution Parrot OS 5.1.
uname -a command yields:
Linux parrot 6.0.0-12parrot1-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1parrot1 (2023-01-12) x86_64 GNU/Linux

The distribution version of Libreoffice was removed because of a bug with recognizing Java versions and the community version was installed instead:

Version: 7.5.0.3 (X86_64) / LibreOffice Community
Build ID: c21113d003cd3efa8c53188764377a8272d9d6de
CPU threads: 12; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: da-DK (da_DK.UTF-8); UI: en-US
Calc: threaded

Java is manually installed from Oracle version 19.0.2, I have tried 17.0.6 and 11.0.18 from Debian with similar (bad) results.

Not a solution but a comment.

Zotero is huge sophisticated tool which use is not justified in many cases. Personally, I don’t use it because I don’t need to manage citations independently from LO and Zotero doesn’t integrate at all with the style machinery in Writer. The second point stems from the portability of Zotero. There is a single source working in LO, MSO and other suites. To simplify maintenance, there is no attempt to use the suite formatting primitives and every insertion is handled through macros and direct formatting. This deliberate choice ruins any sophisticated formatting styling.

Writer provides an elementary citation engine. Citations are internal to LO and can’t be shared with other applications. If your citations are needed only in Writer documents and you don’t include full text in the citation records themselves, have a try with this lightweight feature. Check your requirements against the possibilities. Eventually, edit your question to describe what you do with your citations and how you format them.

As I mentioned, it does not cover the same purpose as Zotero but it is fully integrated. It does not use macros; consequently, there is no slowdown.

Thank you for the comment.

I am using zotero extensively in my work and it performs well on my two other systems. I cannot switch to another citation system as I have 1,300 zotero managed citations in total in my writings. Up to this point I was happy with the performance of zotero and libreoffice.

I am looking for a way to debug my way through to the root cause of this slowdown that seems to occur. Any help in starting libreoffice with parameters or java with parameters that enable me to debug them is very welcomed.

It may be that you do not personally use it because you do not really have the needs. For decent citing and bibliography management, the 1990’s engine of LibreOffice, however, is woefully inadequate. Your assertion that its use is not justified in many cases is awfully wrong.

Zotero indeed “injects” processed data: how would you expect it to work differently? I do not see what your statement about Zotero applying direct formatting is based on. Citations are injected without any formatting, so take on the formatting of the current paragraph, which is how it ought to be. The reference list is formatted using a dedicated “Bibliography 1”, so that can be customized in one spot.

That said, Zotero may choke on long documents, and may even corrupt them. Then there is the possibility of a corrupted citation followed by the dreaded “Cannot update the references” message, requiring dissasembling the document to find the culprit… It is far from an optimal solution, but there probably is nothing better, and this is lightyears better than the build in feature.

@OP, for me an update (triggered by hitting the “Update” button) takes 2 seconds on a 190 page document containing about 40 references.

You do not provide information, but it may depend on the length of the document and the number of citations. It may be caused by a document with complicated formatting (mixing manual and style), possibly originally created in Word. So also try how it works on documents freshly created in LO. To try debugging the problem, experiment. You also did not mention whether you use Referencemarks (default and recommended in LO) or Bookmarks (Exchangeable with Word). See whether switching to one or another makes a difference.

In the “Preferences” for the document, there is a button “Automatically update citations”. Switching that off could workaround the issue.

For that, add to your question (which is editable) your OS name (Debian according to the Zotero forum link, but it is more friendly to mention it here too with the version number) and LO version. Mention also which Java engine is installed on your problematic computer and if it is the same as on the others. I see on my Fedora machine that I can choose among several engines.

1 Like

In a document of 105 pages with 285 citations that I used to test the system adding a new citation in the first paragraph of the document takes 24 seconds on my i5 and between 55 to 300 seconds on my T14.

I estimated that the T14 should be approximately as fast as the i5. That’s the core of the problem. Why are they so different? My 6 year old T460s (i5-6300u) manages the task in 45 seconds for comparison.

I have thought about unmarking the “Automatically update citations” option. That is a possible workaround but it is frustrating to use workarounds on a much faster laptop than the T460s it replaced.

Wrong. I conducted enough forensics analysis on documents provided by users of this site to assert that Zotero breaks all “nice” styled formatting by adding its direct formatting. In addition most insertions are made with fields and fields can only be styled as a whole, where many users asked for a differentiated styling on author list, title, publishing data, …

I don’t incriminate the superior management possibilities of Zotero. I only regret that what is inserted is a separate world, formatting-wise. This is the same complaint about everything which is inserted via macros. As a bad example, see the so-called “table styles”: they ruin your own styling as soon as the table is modified even in the slightest way.

Anything inserted by Zotero is intended to be managed by Zotero. On a refresh, the content is replaced and updated, and the format is determined by the bibliography style in use, not by the user.
Zotero has the feature to differentiate formatting within a reference (e.g. italicized titles, bold volume numbers). However, such character formatting obviously is determined by the reference style in use, not by the user that manually applies formatting. That character formatting is applied through direct formatting (bold and italics). For bibliography styles not involving character-level formatting, Zotero does not use direct formatting.
To me, direct formatting is any formatting that can be whipped with “Format - Clear direct formatting” (or Ctrl+M). Any other formatting is through styles. Maybe there is some semantic confusion at work here.

Yes

There is a form of “vicious” direct formatting which is demonstrated in the “table styles”: direct formatting deposited by event-triggered macros. Theoretically, this kind of sticky direct formatting could be cleared by Ctrl+M but the macros are immediately retriggered and re-apply their formatting, thus hiding paragraph and character styles. There is no way to fix this, but to avoid to use the feature (if it is not strictly needed).

Hi, I put the information in the original post. Is what i added sufficient?

Hello, I had a similiar performance problem with my Macbook running Libreoffice with Zotero in November 2023. I just checked my files from then again. It seems, that with recent versions of Zotero, Libreoffice and Java the performance is good now. Maybe this could resolve your issue as well.
Best regards

Hi,

Thank you for posting!

I found a solution but forgot to update this thread. If you click the linked zotero forum reference above, you can see what I did. I simply forgot to update this thread with the information. Sorry about that.

I haven’t tested the performance on recent versions, I’ve not noticed the bad performance since I got it fixed.