PKM-er / obsidian-zotlit

A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.
https://zotlit.aidenlx.top
MIT License
647 stars 29 forks source link

Slow startup? #335

Open AnthonyMcDougal opened 5 months ago

AnthonyMcDougal commented 5 months ago

I've been having trouble with slow Obsidian startup times for a while, and after playing with my plugins a lot, I'm pretty sure it's Zotlit that is driving the slow start up for me. It's inconsistent, from 30 sec to 3min or sometimes longer, and tends to only have trouble in my larger vault (~4,000 files), not my smaller one. My Zotero library also has ~4,000 items.

Is there anything I can do to avoid the slow startup? Or something Zotlit can do for me?

Obsidian: v1.5.12 Windows 11 Zotero 6.0.36 (and I have the 7 beta ZIP version on some devices)

Wizard-one commented 5 months ago

Also, Slow startup is observed by me.

I open Debug startup time, this is my console log

[2024-04-30T09:06:04.386] [INFO] obsidian-zotero:main - loading ZotLit
app.js:1 Total plugin setup: 87ms
zotlit: 87ms
21f276a0-79b9-429f-a002-f198cd04e3db:1 [2024-04-30T09:06:04.526] [INFO] obsidian-zotero:db-worker - Finished reading Better BibTex
21f276a0-79b9-429f-a002-f198cd04e3db:1 [2024-04-30T09:06:04.548] [INFO] obsidian-zotero:db-worker - Finished reading main Zotero database for index
21f276a0-79b9-429f-a002-f198cd04e3db:1 [2024-04-30T09:06:04.610] [INFO] obsidian-zotero:db-worker - Library citation index done: 1
2plugin:zotlit:6 [2024-04-30T09:06:04.665] [INFO] obsidian-zotero:main - ZoteroDB Initialization complete.

I think ZoteroDB Initialization is took too much time.

Obsidian: v1.5.12 Window 10 Home 22H2 19045.4291 Zotero version => 6.0.36, platform => Win32, oscpu => Windows NT 10.0; WOW64, locale => en-US, appName => Zotero, appVersion => 6.0.36, extensions => Zotero LibreOffice Integration (6.0.4.SA.6.0.36, extension), Zotero Word for Windows Integration (6.0.4.SA.6.0.36, extension), Zotero Tag (0.3.0, extension), Zutilo Utility for Zotero (3.10.0, extension), Obsidian Note for Zotero (1.0.1, extension)

AnthonyMcDougal commented 3 weeks ago

I recently started using Lazy Plugin Loader to delay loading plugins, and it is an immensely helpful band-aid for this issue.