Right now when you start typing @ in an issue or MR comment, you are presented with a bunch of groups you own. Instead you should first see the person that opened the issue/MR and then all other people that take part in the discussion.
@alfredo1 ideally the backend would handle suggestions instead of having the user download every single user in a project so it can be parsed with JS (could be in the thousands of users, and it doesn't seem to be cached at all, pretty big pain for anyone with a data cap).
I think we currently have plans to cache the autocomplete_suggestions.js file. Probably should bring @yorickpeterse here since he's working on #14009 (closed)
@alfredo1 @connorshea I think we could do in either. Right now the data coming through in a pretty nice plain structure. We could keep it that way to keep it simpler and lighter on the backend.
@jschatz1 I guess I'm just not sure how to feel about loading 550KB of issues, MRs, usernames, and emoji (for the GitLab CE project, it obviously varies depending on the size of the project) on every page load. That's quite a bit of data.
At the least, we should almost definitely separate the emoji into its own JSON file that's cached for a much longer period of time than the other autocomplete data. Do you think that'd be covered by #13299 (closed) or should I open a separate issue?
@connorshea Of course we should do that. I guess I am getting confused what the real question here is. This issue is about @mention precedence. Anything having to do with separate JSON data should be handled in a different issue. One issue at a time here lol.
I'd say it is relevant here, since I've been thinking about how to make autocomplete require less downloading for a while, and wanted to start a discussion on that before anyone implemented this as a frontend feature that may eventually need to be remade on the backend.
@alfredo1 The caching would only apply to the Emoji list, and this will be cached in the memory of each process (that is, it would be loaded as a Ruby hash when booting up).
Just wanted to mention that there also is an issue to add the ability to mention everyone on the GitLab server, not just the project members. I can't find that issue right now.
@sytses I may be wrong as I'm not a DB guy, but I would think that'd be bad thing to have enabled on GitLab.com with millions of users? But a few-thousand-user instance would be perfectly fine.