Skip to content
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

Improve script search performance #15

Open
tchajed opened this issue Jul 14, 2024 · 3 comments · May be fixed by #38
Open

Improve script search performance #15

tchajed opened this issue Jul 14, 2024 · 3 comments · May be fixed by #38

Comments

@tchajed
Copy link
Owner

tchajed commented Jul 14, 2024

There are now enough scripts that search is actually somewhat slow, especially with the character search feature. I put no effort into performance in the first implementation. It's now worth it to look into performance, perhaps by adding some full-text indexing of script titles (with a library) or by doing something less naive (like search a list of characters, then search an index of scripts by character). It might also be useful to cancel an existing search if possible.

@jthemphill
Copy link

Here's a very fast one that indexes all the scripts as a Webassembly module at build time: https://stork-search.net/

@jthemphill
Copy link

https://www.fusejs.io/ looks like a good drop-in replacement, I'll try this

@tchajed
Copy link
Owner Author

tchajed commented Jan 1, 2025

Yeah that looks great - we'll have both fuzzy searching and character + title search, which is perfect. Looks like a little work is needed to generate an index at build time, but you should be able to integrate it into fetch-assets.

@jthemphill jthemphill linked a pull request Jan 1, 2025 that will close this issue
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 a pull request may close this issue.

2 participants