-
Notifications
You must be signed in to change notification settings - Fork 54
Perform seach in the background #178
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
Conversation
This pull request is being automatically deployed with Vercel (learn more). doctocat – ./🔍 Inspect: https://vercel.com/primer/doctocat/r8e4900t6 gatsby-theme-primer-example – ./🔍 Inspect: https://vercel.com/primer/gatsby-theme-primer-example/dblzep6k8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woooo!! This is awesome 🔥 Thanks, @BinaryMuse!
Thanks for doing this @BinaryMuse! We just pulled this change into docs.npmjs.com which uses a fork of doctocat. 🎉 npm/feedback#78 |
Currently, we run a Fuse query on the main thread when the user enters a search term. This causes a lot of GC and some page jank.
This PR moves the Fuse search into the background via web workers. In my testing, this reduced event handler run time from hundreds of milliseconds to around 10.