Autocomplete is slow

Summary

When hitting s anywhere in GitLab, and then searching, the /autocomplete calls seem to take longer with every request that has been sent. A simple test: Starting from https://gitlab.com/gitlab-org/gitlab , searching for:

  • ku -> ber -> netes

gave me the following result:

Screenshot 2024-07-11 at 14.47.15.pngThe last call took over 7 seconds to load. This issue has already been discussed as part of this private issue (internal only), so more details can be found there.

Steps to reproduce

See above

Example Project

This problem appears anywhere on GitLab, as it affects global search autocompletion.

What is the current bug behavior?

The /autocomplete network call takes very long to finish; taking longer with each network call.

What is the expected correct behavior?

Autocomplete should not take longer with every network call. I would expect a search for kubernetes to not take more than 1 s even when typing out the whole word.

Relevant logs and/or screenshots

See above.

Output of checks

This happens on GitLab.com.

Edited by Sabine Carpenter