forked from lostisland/faraday
-
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.
remove hacks when conditionally forwarding blocks in methods
Yes, named blocks (Procs) in methods are slow in Ruby. This is because of unfortunate performance penalty of instantiating and garbage-collecting these Proc objects, which happens even if we never use or even pass a block to the method. Certain methods in Faraday were optimized to avoid named blocks. This removes such optimizations. The rationale is that the performance penalty of named blocks is negligible to the overhead of HTTP requests over the network.
- Loading branch information
Showing
2 changed files
with
11 additions
and
22 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