forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid calling Headers#env_name when static header
`env_name` has to transform given strings into the `HTTP_` type headers that are put in the Rack env. This involves at least one String allocation and a few additional transformations performed on the string. This commit avoids the extra allocations/transformations by precomputing some request header strings so that `env_name` can be avoided. The places changed here show up in a basic controller request, but there may be other places that could be changed as well.
- Loading branch information
1 parent
6045f25
commit 7fe6675
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters