Open eric-wieser opened 3 years ago
One option for improving this would be to :
miniSearch.toJSON()
to export the complete index after constructing it for the first timelocalStorage
MiniSearch.fromJS(the_json_from_local_storage)
, which would bypass the long startup timesWe'd need to make sure there's some mechanism to invalidate that cache when the docs site updates.
I've found the startup time for the search to be very painful, especially since when I click a search result and find its the wrong one, I have to start all over again waiting for it to load.
What's happening here is that the
SharedWorker
is being killed by chrome, because at the point I click the link there are no mathlib_docs tabs open with a search connection to keep it alive.As a workaround, I can just open an extra tab and start a search in it, which is enough to keep the search alive. Better solutions might be to:
Make it so I can open the search results in a new tab.(#97)