Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BBT export renders zotero v laggy and even unresponsive #2667

Open
kzssc opened this issue Oct 4, 2023 · 20 comments
Open

BBT export renders zotero v laggy and even unresponsive #2667

kzssc opened this issue Oct 4, 2023 · 20 comments
Labels

Comments

@kzssc
Copy link

kzssc commented Oct 4, 2023

Debug log ID

QJMQH2PR-euc/6.7.122-7

What happened?

basically what the subject says, what's also indicative is the power consumption ramps up to 3,000s (versus <100 when BBT is not exporting) as reported here: #2522 (comment)

https://i.imgur.com/MtCXgK9.png

BTT: 6.7.122
7.0.0-beta.43+f803c0cc4
M1 13.6

@kzssc kzssc changed the title BBT export rendering zotero v laggy and even unresponsive BBT export renders zotero v laggy and even unresponsive Oct 4, 2023
@retorquere
Copy link
Owner

Is this an auto-export or a manual export?

@kzssc
Copy link
Author

kzssc commented Oct 5, 2023

This one is manual, but auto export also runs into this.

@retorquere
Copy link
Owner

A debug log will drop here shortly; can you install that, then go into the preferences and click Export now for one auto-export, let it finish, then click Export now again for the same auto-export, let it finish, and then send a new debug log.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

🤖 this is your friendly neighborhood build bot announcing test build 6.7.122.2667.5171 ("logging")

Install in Zotero by downloading test build 6.7.122.2667.5171, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@kzssc
Copy link
Author

kzssc commented Oct 6, 2023

4SNJ4PBS-euc/6.7.122.2667.5171-7 hope this helps!

@retorquere
Copy link
Owner

A new build will drop shortly, can you do the same procedure again please?

Part of the problem is that BBT drops its caches when you upgrade Zotero, and at least between QJMQH2PR-euc/6.7.122-7 and 4SNJ4PBS-euc/6.7.122.2667.5171-7 you did upgrade. That will make the first of the two very slow, but the 2nd (and following) should be substantially faster. The new build will tell.

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

🤖 this is your friendly neighborhood build bot announcing test build 6.7.122.2667.5174 ("more logging")

Install in Zotero by downloading test build 6.7.122.2667.5174, opening the Zotero "Tools" menu, selecting "Add-ons", open the gear menu in the top right, and select "Install Add-on From File...".

@kzssc
Copy link
Author

kzssc commented Oct 7, 2023

Thanks for the quick actions and the insights! Will test it out.

In hindsight I'm less concerned about the need for cache rebuild but more on how much system resources it's using which renders Zotero practically unusable...perhaps de-prioritising it on CPU usage?

@retorquere
Copy link
Owner

The cache use has a direct influence here. A filled cache makes BBT much more efficient.

I can't really influence the CPU priority. If you want to I can explain how zotero translators work but the bottom line is that you need to have a filled cache to have a 10k+ export be tolerable qua performance impact.

@kzssc
Copy link
Author

kzssc commented Oct 7, 2023

VSE847TS-euc/6.7.122.2667.5174-7 here you have it :))

@retorquere
Copy link
Owner

Blegh, the bulk of the time is spent in prep, and prep is what hinders the UI responsivity. I have been planning a solution for this but it's going to be quite a bit of work. Worth it but it might take me a few weeks to get this working.

@kzssc
Copy link
Author

kzssc commented Oct 19, 2023

perhaps a related issue: when BBT is enabled - with auto-export turned off - adding new attachment files to zotero (via new built-in function) also renders UI very slow. Disabling BBT then, file import does not incur UI lag.

My guess is that citekey generation and association might be the cause of high CPU usage? Which diagnosis code should I attach, zotero's or BBT's?

@retorquere
Copy link
Owner

retorquere commented Oct 19, 2023

It's not key generation. No work is done for attachments as they don't get keys.

Which diagnosis code should I attach, zotero's or BBT's?

Always BBTs. I cannot access Zotero debug logs.

@kzssc
Copy link
Author

kzssc commented Oct 20, 2023

Here you go 😃 : SGCT6TJW-euc/6.7.130-7

@retorquere
Copy link
Owner

There's another bug I must address first, but I'm in the middle of a restructuring that should lead to improvements for the problem you're facing. That will unfortunately take me about a week to get done, so it will go silent here for a bit.

@daeh
Copy link

daeh commented Nov 2, 2023

Just wanted to add that I had auto export turned on and any modification to the library caused the UI to hang for 20-40 seconds. I disabled the automatic exports for now. Happy to submit logs if helpful.

Thanks!

@retorquere
Copy link
Owner

Already working on it.

@kzssc
Copy link
Author

kzssc commented Dec 6, 2023

A minor update on this: I suspect that even with auto-export off - whenever Zotero syncs - this happens. So just to confirm: the sluggishness happens on two occasions: 1. when zotero syncs and 2. when bbt exports. Though I can't quite replicate the problem with 1 as it doesn't always happen.

Initially I suspected that's a Z7 bug (posted here: https://forums.zotero.org/discussion/109954/z7-sluggish-ui-due-to-sync#latest) but once I disabled BBT, UI works normally.

@kzssc
Copy link
Author

kzssc commented Mar 3, 2024

I am not sure whether the following is a remedy for current issue or request for permanent function:

In auto-export, could an option of "auto-exporting with zotero launch" be created?

The current options for auto-export are a bit too frequent, I think. Another thing is I'm not entirely sure the mechanism for "When Idle": auto-export seems to kick-off even when I'm interacting with Zotero.

Many thanks as always, @retorquere !

@retorquere
Copy link
Owner

retorquere commented Mar 3, 2024

I'm working on a fix for the sluggishness. I don't see real value in "at launch", and it would be hard to get it to be both reliable and performant, but if "when idle" misbehaves for you, you can open a new issue for that and I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants