Skip to content

Optimize ProjectWiki#empty? check

Stan Hu requested to merge sh-optimize-wiki-empty-check into master

The empty? check was iterating over all Wiki pages to determine whether it was empty. Using the limit parameter allows us to bail out early once we found a page.

Note that this currently only improves performance for GitLab 11.0 until gitaly#1204 (closed) is fixed.

Relates to #40101 (closed)

Merge request reports