BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

Search loads slowly

Open eddiejaoude opened this issue 3 years ago • 6 comments

Description

Currently loading all profiles to search, maybe this would be better with an API request each time the search parameters change

Screenshots

No response

Additional information

No response

eddiejaoude avatar Jan 07 '23 13:01 eddiejaoude

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Jan 07 '23 13:01 github-actions[bot]

Should we call API when the user presses Enter or changes input each time? Because later one may result in too many API calls.

shyam0705 avatar Jan 08 '23 11:01 shyam0705

Good question 👍

I think after each time the input changes but only after 3+ characters - we can also add a delay of 500ms just in case they are still typing

eddiejaoude avatar Jan 09 '23 11:01 eddiejaoude

I think yes it would be better for the future too when the code base has a tons of profiles

ManishBisht777 avatar Jan 09 '23 15:01 ManishBisht777

Do you have any suggestions about how to filter profiles? Because we are storing profiles in JSON files so don't think we can apply any filter without actually loading all profiles one way can be to load all profiles whenever the server starts and then filter from that in every API call.

shyam0705 avatar Jan 09 '23 17:01 shyam0705

Ah yes this might require some more thought. Maybe it should way until we see what happens with moving profiles to the database

eddiejaoude avatar Jan 10 '23 07:01 eddiejaoude