diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2017-11-17 14:48:32 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-11-17 14:48:32 +0300 |
commit | ff26ea818cb92eabc8fbea1a8385cb5bc6b0a66f (patch) | |
tree | e252a9e7be6cc35d76e78745aa6ed437f1279ed1 /app/models/project_wiki.rb | |
parent | 88d29775bbbeaeff7deff8fb1be58905f2535a96 (diff) |
Resolve "Performance issues when loading large number of wiki pages"
Diffstat (limited to 'app/models/project_wiki.rb')
-rw-r--r-- | app/models/project_wiki.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb index 3eecbea8cbf..a0af749a93f 100644 --- a/app/models/project_wiki.rb +++ b/app/models/project_wiki.rb @@ -76,8 +76,8 @@ class ProjectWiki # Returns an Array of Gitlab WikiPage instances or an # empty Array if this Wiki has no pages. - def pages - wiki.pages.map { |page| WikiPage.new(self, page, true) } + def pages(limit: nil) + wiki.pages(limit: limit).map { |page| WikiPage.new(self, page, true) } end # Finds a page within the repository based on a tile |