publish-org-roam-ui
publish-org-roam-ui copied to clipboard
Search feature performance improvement
Hi and thanks again for all your work on this great project.
I have an org-roam dataset of about 3700 nodes and I can notice the search feature is having quite a hard time when trying to do live completion.
I have looked at the way it is currently done and if I am correct there is code that generates a JSON file with all the entries (generate_searchdata.mjs
). Then the search feature will use the JSON file to do its live completion.
I was wondering if we could improve the performances by using the binary version of the JSON format, i.e. BSON file format instead.
It seems there is a JS library available to do this.
import BSON from 'bson';
//...
const bsonData = BSON.serialize(searchData);
You can test my network of nodes at https://elitedangereuse.github.io/LoreExplorer/ and check the search performances there. Other than the search feature, the rest is super smooth.
This is just a suggestion, and you might come up with a far better implementation.
I was also considering the use of a xapian index and I can see there is a Node implementation of it: https://github.com/mtibeica/node-xapian#readme
Thanks a lot for considering this improvement.