Closed noVaSon closed 6 years ago
This was a pretty merging-mess. I tried to squash it into fewer commits but did not succeed - however it works...
Hi, is this making a request at each key stroke? You should add some timer so the request is only made after some time has passed and no key has been pressed (150 ms for example). In this way we minimize queries to FS. Be careful that the order of query responses is not guaranteed so you should have some way to only show search results count for the last query you did.
Hi! Oh, you are right! I just tested a little more and got some 429 from the server. I am trying some debouncing right now to get over this. I'll leave a message when I solved it! Thanks for the warning :)
Ok, I successfully debounced the requests with 400 ms - this also makes responses out of order less likeley. I'd have to dig a little deeper for the order issue.
Hi, let me know when this is ready to review/merge. As far as I understand there is still the request order issue that needs to be addressed right?
Hi @ffont I have no idea how to solve this issue... maybe with a PromiseAll array / I think since the debounce this issue is rather minor and can be adressed in case it shows as a bug sometime. If the predicted number is wrong, there will be no harm anyway. Please correct me if I am prooving arrogance here :)
I agree the issue is minimal, I'll merge then.
Here comes a direct feedback to the user for seeing the impact of his query formulation on the number of results. This Info is displayed in the system message box before submitting the query.
This is a immense improvement, as calculating the map is not abortable and firing a query takes quite long.
Cares for #64