Use memorized tags array when searching tags by name
What does this MR do?
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4423 introduced a sorting dropdown for the tags page. As a side effect, the paginated array used is now of Tag objects instead of tag name Strings, and therefore the name sorting (the default) does:
+ VersionSorter.rsort(tag_names).map { |tag_name| find_tag(tag_name) }
The find_tag
method is non-memorized, so it hits the repository for every tag. This MR updates it to use the memorized tags array
Are there points in the code the reviewer needs to double check?
No
Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ce/tags is not loading
What are the relevant issue numbers?
Closes #18924 (closed)
Screenshots (if relevant)
On my local machine:
BEFORE
AFTER
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together