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 search performance πŸ”ŽπŸƒβ€β™‚οΈ #287

Open
colebemis opened this issue Nov 7, 2019 · 6 comments
Open

Improve search performance πŸ”ŽπŸƒβ€β™‚οΈ #287

colebemis opened this issue Nov 7, 2019 · 6 comments

Comments

@colebemis
Copy link
Member

There is noticeable lag when searching. Let's fix that.

@jletey
Copy link

jletey commented Nov 7, 2019

I've noticed this as well @colebemis. I'll take a look at the codebase and see if I find anything that could be the culprit πŸ”Ž

@colebemis
Copy link
Member Author

That'd be awesome! This code block seems like a good starting point: https://github.com/feathericons/feathericons.com/blob/master/src/pages/index.js#L16-L21

@colebemis
Copy link
Member Author

Hmm, I'm not noticing any lag anymore. Is search still sluggish for you, @johnletey?

@anthonygedeon
Copy link

anthonygedeon commented Oct 2, 2020

I'll work on this issue!

@anthonygedeon
Copy link

anthonygedeon commented Oct 6, 2020

The search input component performs a lot better now #287

  • User can quickly spam (or hold down) the backspace key (previously had to hit the key 1 at at time)
  • Utilizes a denounce function to set the query at a later time (500 ms to be exact)
  • On feathericons.com, if you typed too fast, the query would not get all the letters, this feature prevents that from happening

There is a bug though, the result is not waiting until the query is done after 500ms.

Here's a GIF of the working feature

https://gph.is/g/ZYoqpJn

@DevT0ny
Copy link

DevT0ny commented May 23, 2021

I have found solution for this on heroicons.dev site
May be it will help you out.
https://github.com/zaydek/heroicons.dev/blob/61042d17b54ac2f0a04e92bc85184ac6ed132a41/src/pages/index.js#L500-L534

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

No branches or pull requests

4 participants