75% faster search results in Advanced Search
Release notes
We are continually finding new ways to make Advanced Search faster. We had a check that happened on every query that was determining if a namespace was indexed.
We recently added caching for a check that that determines if a namespace was indexed. This improved the search result page by 75%.
Documentation: https://docs.gitlab.com/ee/user/search/advanced_global_search.html#faster-searches
Problem
When doing a group scoped search we are spending ~800ms just checking if ES is enabled for the namespace. See example https://gitlab.com/search?group_id=9970&scope=issues&search=jwt+limiting+token. The first 6 queries are from elasticsearch_indexes_namespace?
Solution
- Cache it. This was already implemented for project check at https://gitlab.com/gitlab-org/gitlab/-/blob/f59512fc603c2ac1b6c6a3904e9efa5960814edd/ee/app/models/ee/application_setting.rb#L150
- We also optimized the query for projects at !30612 (merged) to make it much faster. We can probably optimize the query for namespaces as well.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.