diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-24 19:00:26 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-04-01 12:13:48 +0300 |
commit | 84b0ab77667b85a42db8a5a02d9758657af66f16 (patch) | |
tree | 5058f048563c8d8e8be4b7e0837d919ff0a878d4 /lib/gitlab/url_builder.rb | |
parent | 82539cff700931532b22b6a8e3d6832137fc5d55 (diff) |
Added & use Gitlab::Routing for URL helpers
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 'lib/gitlab/url_builder.rb')
-rw-r--r-- | lib/gitlab/url_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb index 6f0d02cafd1..22c91be9207 100644 --- a/lib/gitlab/url_builder.rb +++ b/lib/gitlab/url_builder.rb @@ -1,6 +1,6 @@ module Gitlab class UrlBuilder - include Gitlab::Application.routes.url_helpers + include Gitlab::Routing.url_helpers include GitlabRoutingHelper def initialize(type) |