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

Am I the only one noticing a significant slow done in (building embeddings) new version? #595

Open
bbecausereasonss opened this issue May 9, 2024 · 15 comments

Comments

@bbecausereasonss
Copy link

bbecausereasonss commented May 9, 2024

Slow-Example.mp4

Everytime I open Obsidian, the SC plugin now takes about 2-3x as long during the initial ingest period. 600 (stuck around here) to 1000 notes. Used to just fly, but the new version I'm experiencing a significant slow down, really not sure what it's caused by.

@brianpetro
Copy link
Owner

Hey @bbecausereasonss

Similar issues have been reported in the chat. I started making some changes to address this.

The changes are now available in 2.1.60 and the early release.

While the changes don't exactly speed things up, they will prevent any really long-running batches.

🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented May 10, 2024

Hmm. Did not fix it, still gets stuck at 600 then goes slow.

Also now won't accept my Gemini API KEY... Says invalid no matter which I try.

@bbecausereasonss
Copy link
Author

Looks like Claude also broken.

image

@brianpetro
Copy link
Owner

@bbecausereasonss wow, sorry to hear that you're having so many issues ☹️

Is anything being logged to the console when stuck at 600? Any batch that takes longer than 10 seconds should dump which files are taking too long in the console.

Both Gemini and Anthropic should work after disabling and re-enabling the plugin. It has to do with the settings not being properly reflected after changing models, I'm working on a fix now.

And, also with Gemini, I've been having more issues because of their "1 per minute" API request limit for free accounts, which b basically makes it unusable in the Smart Chat when using notes as context.

🌴

@bbecausereasonss
Copy link
Author

I'm on Gemini's paid plan.

Okay I'll try enable/disable.

So the time issue is due to ingesting over 1k embeddings (separately). Although that fixed the single large embedding corruption issue it introduced a super slow to create any embedding or load issue.

@bbecausereasonss
Copy link
Author

Also no console logs during pause at 600... just a pause, then it continues.

@brianpetro
Copy link
Owner

The "making smart connections" isn't doing any embedding. It's simply scanning for changes to trigger embeddings in the subsequent process.

I'm also not sure I understand what you're saying here

So the time issue is due to ingesting over 1k embeddings (separately). Although that fixed the single large embedding corruption issue it introduced a super slow to create any embedding or load issue.

@bbecausereasonss
Copy link
Author

bbecausereasonss commented May 11, 2024 via email

@brianpetro
Copy link
Owner

Especially on a blading fast
ssd. 😀

Could be a bottle neck of RAM, which even if you have a lot of it, the underlying electron architecture implements an arbitrary limit, which can be raised but it would be reasonable for Obsidian still to maintain a lower limit for lack of perceived need.

I should be able to offload this to the Smart Connect software, similar to what's done with the embeddings, to improve the performance that way.

There are also other things I can try to optimize in the implementation, but adding it into Smart Connect will likely be first because it also serves a few other things I'm working on.

🌴

@bbecausereasonss
Copy link
Author

bbecausereasonss commented May 11, 2024 via email

@brianpetro
Copy link
Owner

even if you have a lot of it, the underlying electron architecture implements an arbitrary limit

@ru13r
Copy link

ru13r commented May 12, 2024

Hi, I have the similar issue.
Updated to version 2.1.63.
My vault is large (over 1600 notes).

I get the message "Making smart connections", the counter is stuck for some time at 730-740 of 1655, freezing the interface for a while, then quickly goes through all the notes up to 1655 and works.

This re-scan happens every time Obsidian starts (and sometimes when new notes are created or existing notes rearranged).

It seems at a first glance that some embeddings data might became corrupted and cannot be properly read by the plugin.

The message.
image

Screenshot from the console.
image

@ru13r
Copy link

ru13r commented May 12, 2024

Following the issue.
It turned out, some notes in the vault (/Maths subfolder) where causing a freeze during loading,
excluded the folder in Settings for now and manually removed the embeddings data from .smart_connections/multi folder.

Interesting though, why does the loader has trouble with some particular notes.

I also noticed, that all Cyrillic characters in the note filenames are replaced by underlines in smart_connections note file names. Can this cause any trouble later?

@bbecausereasonss
Copy link
Author

bbecausereasonss commented May 15, 2024

Mine is still oddly pausing at around 600 mark with no real logs :/

Should I just nuke my folder and redo all the embeddings?

@bbecausereasonss
Copy link
Author

Redid them, did not make a difference :(

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

No branches or pull requests

3 participants