gitlab-org--gitlab-foss/lib/gitlab/middleware
Stan Hu 3c52e2f06e Optimize read-only middleware so that it does not consume as much CPU
In !15082, we changed the behavior of the middleware to call
`Rails.application.routes.recognize_path` whenever a new route arrived.
However, this can be a CPU-intensive task because Rails needs to allocate
memory and compile 850+ different regular expressions, which are complicated
in GitLab.

As a short-term fix, we can do a lightweight string match before
we do the heavier comparison.

Closes #40185, gitlab-com/infrastructure#3240
2017-11-20 15:27:52 -08:00
..
go.rb Merge branch '18040-rubocop-line-break-after-guard-clause' into 'master' 2017-11-20 09:22:14 +00:00
multipart.rb
rails_queue_duration.rb move metrics for ActiveRecord, RailsCache and queue duration to instance variables 2017-11-02 18:18:16 +01:00
read_only.rb Optimize read-only middleware so that it does not consume as much CPU 2017-11-20 15:27:52 -08:00
static.rb
webpack_proxy.rb