Truncate tree to max 1,000 items and display notice to users
Note
Tests for this MR will not pass until gitlab-test!27 (closed) is merged.
What does this MR do?
Fixes #39746 (closed)
A customer encountered timeouts and slow page load performance in several projects where some directories had over 25,000 files in them. We ran some tests to determine whether the bulk of time was spent getting the items from the Git repo or in rendering them. Rendering accounted for approximately 95% of the page load time. Realistically, displaying all 25,000 items probably isn't useful anyway - no user is going to be able to browse those files. Users can also take advantage of the 'Find files' feature to find a specific file they need to view/edit.
A solution to the problem is to truncate the tree at 1,000 items and show the user a notice. We tested this on the customer's dev instance and page load times went from 60+ seconds to 1-2 seconds. They are satisfied with this proposed solutions.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered