There was an error while loading. Please reload this page.
2 parents 8c760ed + 18d7c1d commit cdea863Copy full SHA for cdea863
lib/gitlab_projects.rb
@@ -5,7 +5,6 @@
5
require_relative 'gitlab_config'
6
require_relative 'gitlab_logger'
7
require_relative 'gitlab_metrics'
8
-require_relative 'gitlab_reference_counter'
9
10
class GitlabProjects
11
GLOBAL_HOOKS_DIRECTORY = File.join(ROOT_PATH, 'hooks')
@@ -408,7 +407,12 @@ def wait_for_pushes
408
407
end
409
410
def gitlab_reference_counter
411
- @gitlab_reference_counter ||= GitlabReferenceCounter.new(full_path)
+ @gitlab_reference_counter ||= begin
+ # Defer loading because this pulls in gitlab_net, which takes 100-200 ms
412
+ # to load
413
+ require_relative 'gitlab_reference_counter'
414
+ GitlabReferenceCounter.new(full_path)
415
+ end
416
417
418
def rsync(src, dest, rsync_path = 'rsync')
0 commit comments