-
Notifications
You must be signed in to change notification settings - Fork 198
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
Auto-Complete for Search Box #727
Comments
fwiw, we have autocomplete at http://matrix.hackage.haskell.org/ ; that requires to seed the webbrowser with a JSON array of all package names |
I think the auto-complete at http://matrix.hackage.haskell.org/ is very nice. Is it desirable to avoid seeding the browser with all the package names? Looking at the API call that's being made, https://matrix.hackage.haskell.org/api/v1.0.0/package/list/?count=100000, it seems to be limiting it to a 100.000 packages. The returned response is roughly 600 kilobytes of JSON. In the grand scheme of things, it's not a lot(and probably made a lot less by compression), but I think it can still be avoided. We could simply send an API call upon typing a character, which would then limit the response to packages starting with those characters. In order to avoid hitting the API too much, we could just cache the responses so that if I type |
I think that would put more load on the server and also decease overall responsiveness. We can cache and share the file, if it is fixed, and only generate it rarely on the server. (and also only fetch it periodically for the client -- imho it is ok if auto-completion lags the db for up to 24 hours or more). |
fwiw, that's actually the old faked API; the new API (which isn't live yet) just sends a |
Good suggestion. The question is what we auto-complete to? I suppose package names, possibly tags...
(we could also have jump-to-package on exact match. but we'd want to not force that on users, but only make it optional -- need good ui for that)
The text was updated successfully, but these errors were encountered: