diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-24 17:00:26 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-01 11:13:48 +0200 |
commit | 84b0ab77667b85a42db8a5a02d9758657af66f16 (patch) | |
tree | 5058f048563c8d8e8be4b7e0837d919ff0a878d4 /app/models/project_services | |
parent | 82539cff700931532b22b6a8e3d6832137fc5d55 (diff) | |
download | gitlab-ce-84b0ab77667b85a42db8a5a02d9758657af66f16.tar.gz |
Added & use Gitlab::Routing for URL helpersrouting
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/gitlab_issue_tracker_service.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/jira_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project_services/gitlab_issue_tracker_service.rb b/app/models/project_services/gitlab_issue_tracker_service.rb index 05436cd0f79..eaa5654b9c6 100644 --- a/app/models/project_services/gitlab_issue_tracker_service.rb +++ b/app/models/project_services/gitlab_issue_tracker_service.rb @@ -20,7 +20,7 @@ # class GitlabIssueTrackerService < IssueTrackerService - include Gitlab::Application.routes.url_helpers + include Gitlab::Routing.url_helpers prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index aba37921c09..1ed42c4f3e7 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -21,7 +21,7 @@ class JiraService < IssueTrackerService include HTTParty - include Gitlab::Application.routes.url_helpers + include Gitlab::Routing.url_helpers DEFAULT_API_VERSION = 2 |