Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regaining lost memories #39

Merged
merged 2 commits into from
Mar 20, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions _posts/2014-03-03-regaining-lost-memories.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ config.middleware.delete(Rack::ETag)
config.middleware.delete(Rack::ConditionalGet)
config.middleware.delete(ActionDispatch::RequestId)
config.middleware.delete(ActionDispatch::RemoteIp)
config.middleware.delete(Rack::MethodOverride)
config.middleware.delete(ActionDispatch::Callbacks)
unless Rails.env.development?
config.middleware.delete(ActionDispatch::Reloader)
end
Expand All @@ -108,3 +106,7 @@ Puma seems to have a significantly smaller memory footprint. I can't really add
Micro-managing dependencies is not really worth the trouble. Although I feel better knowing that some unneeded libraries are not loaded, so there's that.

Pruning middleware can speed up the time it takes for Rack to process each request. Of course it is not going to make your database queries run faster but for short requests it might give you a measurable improvement.

## Update

* Removing `ActionDispatch::Callbacks` seems to have some weird side-effects, experiment with it at your own risk. Related snippet updated.