khoj-ai / khoj

Your AI second brain. Get answers to your questions, whether they be online or in your own notes. Use online AI models (e.g gpt4) or private, local LLMs (e.g llama3). Self-host locally or use our cloud instance. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp.

Home Page:https://khoj.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FIX] Lag in Loading Conversation History with Images

tichondrius808 opened this issue · comments

Describe the bug

Khoj plugin inside obsidian literally freezes the whole thing to the point that i have to get out. Desktop app is better, but still lags a lot. web version takes a lot of time to do responses.

Also either the sync is failing or something else, but try to test just a simple question about a note title, many times in the past days khoj literally writes about a 3th or less of the info of the specific note, and says it does not know any more info. Many times i check and the references are wrong.

To Reproduce

It started to do this after i generated many images with it. I dont know if this is the cause.

Screenshots

If applicable, add screenshots to help explain your problem.

Platform

  • Server:
    • Cloud-Hosted (https://app.khoj.dev)
    • Self-Hosted Docker
    • Self-Hosted Python package
    • Self-Hosted source code
  • Client:
    • Obsidian
    • Emacs
    • Desktop app
    • Web browser
    • WhatsApp
  • OS:
    • Windows
    • macOS
    • Linux
    • Android
    • iOS

Additional context

I did tried reinitialize , and still same, i cannot even check console when it happens inside obsidian.

Hi @tichondrius808! I do think the lagging/perf degradation is because of image generation. It puts a lot of strain on the client and increases the size of your chat history.

We do plan to upload the generated images in S3 and serve them via URLs, which should improve the performance, but it might be a bit limited for now.

The best thing to do would be to save any data you want from the chat and then clear the chat history. You should be able to keep generating & saving images as you go along, but you may just have to clear out the history until we make a few improvements 🙂!

Yea it seems fix with new version^^ will keep trying.Its just for now is kind of dificult to manage the different conversations and what memory is using from each of them. But lag is gone with new version i didnt even had to delete some of older chats.