Skip to content

Truncate tree to max 1,000 items and display notice to users

Drew Blessing requested to merge dblessing/gitlab-ce:tree_item_limit into master

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)

Screen_Shot_2017-11-10_at_4.35.16_PM

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Drew Blessing

Merge request reports