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

cleanDB() can block the database thread for too long #2616

Open
cebtenzzre opened this issue Jul 9, 2024 · 1 comment
Open

cleanDB() can block the database thread for too long #2616

cebtenzzre opened this issue Jul 9, 2024 · 1 comment
Assignees
Labels
chat gpt4all-chat issues chat-ui-ux Issues related to the look and feel of GPT4All Chat. local-docs

Comments

@cebtenzzre
Copy link
Member

Scanning all collections for deleted files, and removing embeddings and documents where necessary, can be a slow operation. This is done on startup and whenever a folder is updated, and is not interruptible or done in chunks/incrementally. This can mean that requesting an embedding for LocalDocs query lookup in a chat, or even just closing the UI, can take significantly longer than expected. When a chat is waiting on an embedding, this will also block the LLM thread, which can make the UI feel really stuck.

We should find a way to make cleanDB(), which performs this operation, block the database thread for less time, e.g. by making it incremental like scanQueue().

@cebtenzzre cebtenzzre added chat gpt4all-chat issues local-docs chat-ui-ux Issues related to the look and feel of GPT4All Chat. labels Jul 9, 2024
@manyoso
Copy link
Collaborator

manyoso commented Jul 16, 2024

You said there was a simple fix that would help the worst part of this bug without fixing it totally... or so I recall... can you elaborate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat gpt4all-chat issues chat-ui-ux Issues related to the look and feel of GPT4All Chat. local-docs
Projects
Status: Short-Term Priority List
Development

No branches or pull requests

2 participants