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.
https://khoj.dev
GNU Affero General Public License v3.0
12.64k stars 640 forks source link

Improve Multi-threading in GUI/Desktop App #443

Closed debanjum closed 1 year ago

debanjum commented 1 year ago

The Khoj server should be made to run multi-threaded in the background even in GUI mode. Currently the server thread is spun-off into just a single QThread to separate it's functioning from the GUI running in a foreground QThread.

This negatively impacts the performance of Khoj in GUI, Desktop mode.

We could use a QThreadpool for the khoj server running in the background to improve the performance