Content-Length: 254592 | pFad | http://github.com/just-the-docs/just-the-docs/pull/1661

68 Initial implementation of web worker for lunr indexing by mgroeber9110 · Pull Request #1661 · just-the-docs/just-the-docs · GitHub
Skip to content

Initial implementation of web worker for lunr indexing #1661

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mgroeber9110
Copy link

This is a first attempt at using a web worker thread to perform the indexing for lunr, so the page remains responsive while the index is being built. The code also includes a synchronous fallback for situations where the web worker API is not available, though I am not sure this is actually relevant for existing browsers. After a few seconds, there is still a brief freeze in screen refresh as the index is loaded, but at least the page is usually able to finish its initial layout pass.

This fix is currently being used by our experimental documentation site at https://mgroeber9110.github.io/just-the-docs-test.

I have not done much frontend development in the last 15 years or so, so any feedback is welcome. :-)

Closes #1210.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large search indices block UI on page load (initSearch)
1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/just-the-docs/just-the-docs/pull/1661

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy