googleapis / gax-ruby

Google API Extensions for Ruby
https://rubygems.org/gems/google-gax
BSD 3-Clause "New" or "Revised" License
20 stars 22 forks source link

jump through fewer procs #87

Closed pongad closed 7 years ago

pongad commented 7 years ago

Benchmarks suggest procs have significant overhead, so this change turn procs into direct function calls instead.

Our QPS improved from ~6100 to ~7300. Raw gRPC client gets ~9000.

There are more opportunities to use fewer procs still, but I'll keep the change small for now.

codecov-io commented 7 years ago

Codecov Report

Merging #87 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #87      +/-   ##
==========================================
+ Coverage   98.59%   98.64%   +0.05%     
==========================================
  Files          20       20              
  Lines        1775     1767       -8     
==========================================
- Hits         1750     1743       -7     
+ Misses         25       24       -1
Impacted Files Coverage Δ
lib/google/gax/api_callable.rb 98.23% <100%> (-0.12%) :arrow_down:
spec/google/gax/bundling_spec.rb 100% <0%> (+0.3%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 141c2d6...4420247. Read the comment docs.