mind-foundation / ascstudymonitor

The ASC Study Monitor is a curated, freely accessible, and regularly updated database of scholarly publications concerning altered states of consciousness.
https://asc-studymonitor.mind-foundation.org
9 stars 3 forks source link

Search performance #28

Closed membranepotential closed 4 years ago

membranepotential commented 4 years ago

Something is causing bad performance on search. Since we already have a search index it shouldnt be that slow. Please do your profiling magic to see if there is an easy fix ;-)

If its not easy, lets push it to 2.1.

trueter commented 4 years ago

With queries did you experience bad behavior with and do you agree that below 300ms should be acceptable?

membranepotential commented 4 years ago

the search time itself doesn't matter, but the input should feel snappy :) Probably expressed myself wrong...

membranepotential commented 4 years ago

interestingly the filters are good, even though these are O(n) where the the search should be more efficient, but i dunno :man_shrugging:

Edit: Looked it up, the fuse search is probably also O(n) with larger overhead

membranepotential commented 4 years ago

https://www.npmjs.com/package/@iosio/fuse-worker

this might help?

membranepotential commented 4 years ago

In the end, setting debounce to a higher value (300) helped a lot