- Make sure that everything can run in the background - asynchronous
- Keep the server running, and iterate through all the active buffers first; and then all the files in the current file to find the most relevant files there.
- Check if the current file has been iterated before, if yes:
- Return the result
- If not:
- prioritse this over the init function and do this instead?
- and store the result
- For this, maintain a priority queue maybe?
- Check if the current file has been iterated before, if yes:
- Store everything in in-house DB and make sure that it's persisted in the DB on exit / reboot.
A user should have option for some configs:
- Number of relevant files and authors, this goes in extension config. On each config change, the user should call initialize function to be able to change it.
- Can each workspace have an optional config where they know which files / extensions / directories to index? OR which directories or files with extensions to NOT index?
- Can we yield instead of return?
- can we let user know on the progress?
- In case file is not present, the file should have "renamed" flag.
- Once they click on a file, and if the flag
renamed
is somehow associated, call the server back again to fetch the new file. - What's the best way to almost sort given array?
- How to calculate available threads?
- It's more like a scheduler design initially where load balancing has to happen across available threads