summaryrefslogtreecommitdiff
path: root/lib/base64.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-09-11 12:00:29 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-09-28 14:54:22 +0900
commitc55b5f106295aa3c7611a15a9bf7f0d589447ea7 (patch)
treec24603a4d9ee19f2f3e9f7792fbfce69872d119d /lib/base64.rb
parent91865230cdebee3de7bfde1c91d4e3f63ad15787 (diff)
[rubygems/rubygems] Avoid duplicated generation of APISpecification objects
As far as I could see, `Gem::Resolver::APISpecification` objects are supposed to be immutable. If my guessing is correct, then we can cache and reuse its instances for performance. At least, `rake` passes on my machine. Before this change: ``` $ time ruby -I lib bin/gem install --no-doc aws-sdk Successfully installed aws-sdk-3.0.1 1 gem installed real 0m37.104s user 0m36.952s sys 0m0.333s ``` After this change: ``` $ time ruby -I lib bin/gem install --no-doc aws-sdk Successfully installed aws-sdk-3.0.1 1 gem installed real 0m23.905s user 0m23.740s sys 0m0.365s ``` https://github.com/rubygems/rubygems/commit/7e8fbba85c
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3599
Diffstat (limited to 'lib/base64.rb')
0 files changed, 0 insertions, 0 deletions