gitlab-org--gitlab-foss/spec
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
..
bin
config
controllers Impersonation no longer gets stuck on password change. 2017-11-20 18:02:41 +01:00
db/production
factories
features Impersonation no longer gets stuck on password change. 2017-11-20 18:02:41 +01:00
finders
fixtures
helpers
initializers
javascripts
lib Optimize read-only middleware so that it does not consume as much CPU 2017-11-20 15:27:52 -08:00
mailers
migrations
models
policies
presenters
requests
routing
rubocop/cop
serializers
services
sidekiq/cron
support
tasks
unicorn
uploaders
validators
views
workers
factories_spec.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb