-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HTTP/2: Cache whether the port is default in the conn
When constructing the authority pseudo header we check if the conn's port is the default for the conn's scheme using `URI.default_port/1`. That corresponds to an ETS lookup into the `:elixir_config` table. It's relatively fast to read that information but the conn's port and scheme are static for the life of the conn, so we should determine this information once while initiating the conn (`Mint.HTTP2.initiate/5`). This change saves a small amount of time per request and becomes more valuable as the conn is re-used for more requests.
- Loading branch information
1 parent
321c830
commit 53e988e
Showing
1 changed file
with
14 additions
and
9 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