leanprover-community / doc-gen

Generate HTML documentation for mathlib and Lean
https://leanprover-community.github.io/mathlib_docs/
Apache License 2.0
21 stars 20 forks source link

minisearch webworker is terminated on page reloads #96

Open eric-wieser opened 3 years ago

eric-wieser commented 3 years ago

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:

eric-wieser commented 3 years ago

One option for improving this would be to :

We'd need to make sure there's some mechanism to invalidate that cache when the docs site updates.