Cache Banzai projects/objects using RequestStore
This was originally suggested by @ayufan and modified to be a bit cleaner and use RequestStore instead of a regular Hash. By caching the output of the two methods involved the number of queries is reduced significantly. For example, for an issue with 200 notes (of which 100 reference a number of merge requests) this cuts down the amount of queries from around 6300 to around 3300.
Showing
... | ... | @@ -214,7 +214,7 @@ gem 'jquery-rails', '~> 4.0.0' |
gem 'jquery-scrollto-rails', '~> 1.4.3' | ||
gem 'jquery-ui-rails', '~> 5.0.0' | ||
gem 'raphael-rails', '~> 2.1.2' | ||
gem 'request_store', '~> 1.2.0' | ||
gem 'request_store', '~> 1.3.0' | ||
gem 'select2-rails', '~> 3.5.9' | ||
gem 'virtus', '~> 1.0.1' | ||
gem 'net-ssh', '~> 3.0.1' | ||
... | ... |
Please register or sign in to comment