Improve autocomplete performance
# Problem The first time we type `@` we make a request to the `members` endpoint and load all the members. All the following times we type `@` we do not fetch again, we cache the result. Although this makes it much faster after the 1st request, it is painfully slow to get the first results. In a GitLab issue/mr, when I type `@` we can only see 5 results at a time, however we fetch all the results (about 400) which results in a 1.32s wait. This frustrates me as a user, it makes me give up and go look for the username and type it instead. |||| |--|--|--| |![Screen_Shot_2018-05-16_at_11.46.22](/uploads/92cb39a690d1b6eda6ad308a92097c99/Screen_Shot_2018-05-16_at_11.46.22.png)|![Screen_Shot_2018-05-16_at_11.46.46](/uploads/77bae25792ea45898ecf0ada65aee90b/Screen_Shot_2018-05-16_at_11.46.46.png)|![Screen_Shot_2018-05-16_at_11.46.35](/uploads/69c7230b8a9ae2c862987287bbc95249/Screen_Shot_2018-05-16_at_11.46.35.png)| # Solution If we only show 5 at a time, we could lazy load the results and ask for 5 at a time, maybe 10 if we plan to keep caching the results. This would result in a perceived faster performance and would result in a better (and less frustrating) user experience. I did not check if these endpoints already support pagination.
epic