-
Notifications
You must be signed in to change notification settings - Fork 150
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
Performance indexing and searching #559
Comments
Hi! Probably the main difference is that |
BTW- I dont understand the 2000ms for a search. That seems very high- what are you searching for? |
Hi Fergie, Thanks for your fast response! The searching time still takes quite some time, I might have it configured incorrect? Code that runs on each change:
Sandbox as demonstration: https://codesandbox.io/s/adoring-wozniak-ujip3 |
unfortunately, i can confirm that this library is extremely slow to index, to the point that i cannot include it in my uFuzzy benchmark :( when trying to add 161k documents each containing a single string from testdata.json, i get a callstack explosion: reducing the document count by 10x to 16k, clocks in at 33266ms to build the index. by comparison, the next-slowest library in the benchmark takes 5620ms to index the full 161k dataset. fast fulltext libs take ~500ms to index the entire dataset. |
Hehe- I can see that you are perhaps not completely impartial @leeoniya , but thanks for the test case 👍🙂 Indexing speed is a secondary consideration since search-index allows persistence and import. This means search-index can be switched off and on, and the data will still be there. It also means that implementers can pregenerate indices and then quickly import them. That said- it seems that you have managed to break search-index in a way that shouldn't be possible- I will take a look at your test data when I have time and either introduce a fix, or suggest a set of recommended |
not impartial, but trying hard to stay objective. it's basically impossible to do a broad apples-to-apples comparison of so many libs.
strange take, i gotta say. all search libs i've encountered take at least some care to ensure their indexing performance isn't accidentally quadratic.
think there are several libs that offer serializable indices. Pagefind being one, MiniSearch is another.
👍 |
Hello,
I made two proof of concepts of search-index and itemsjs in Next.js. I looked at the indexing time and the search time of the libraries, using a dataset with 28k movies containg 4 fields.
Results:
Even with search-index using 500 rows it resulted in higher indexing time (~1200msec) then itemsjs with 28k rows.
Indexing code search-index:
Is this common behaviour for search-index?
Thanks in advance.
The text was updated successfully, but these errors were encountered: