Created
January 23, 2010 22:09
-
-
Save defunkt/284823 to your computer and use it in GitHub Desktop.
Why to not use hub with RubyGems
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
# No RubyGems | |
$ time hub version | |
git version 1.6.0 | |
hub version 0.2.0 | |
real 0m0.047s | |
user 0m0.015s | |
sys 0m0.028s | |
# With RubyGems | |
$ time hub version | |
git version 1.6.0 | |
hub version 0.2.0 | |
real 0m0.438s | |
user 0m0.352s | |
sys 0m0.089s | |
# If you have the current git branch in your bash prompt, | |
# you're going to notice the extra half second before it | |
# renders. |
it's still slow.
# No Rubygems
$ time hub version
> 0.03s user 0.01s system 49% cpu 0.093 total
# With Rubygems
$ time hub version
> 0.21s user 0.01s system 95% cpu 0.229 total
$ ruby --version
> ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
$ gem --version
> 1.8.11
$ gem list | wc -l
> 356
tested in ArchLinux with SSD.
Personal Conclusion
Standalone version 3 times faster than rubygems equivalent.
Environment
sisop ubuntu 12.04 in a virtual machine
ruby version 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
gem version 2.0.2
git version 1.7.9.5
hub version 1.10.5
Tests
# No Rubygems
time hub version
#=> real 0m0.096s user 0m0.060s sys 0m0.016s
# With Rubygems
time hub version
#=> real 0m0.266s user 0m0.208s sys 0m0.008s
Gogdghjpgg
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@chastell Thanks for the info, I didn't know the number of gems slowed down the load time, good to know that ruby 1.9.3 has some fixes.