Why Bundler 1.1 will be much fasterPat Shaughnessy@pat_shaughnessyhttp://patshaughnessy.nethttp://rubysource.com
Don’t kill the messenger
(or praise)Don’t kill the messenger
Fetching source index for  http://rubygems.org/
HTTPBundler 1.0           RubyGems.org    Fetching source index for      http://rubygems.org/
What is the “source index?”
Whats inside "specs.4.8"?
What about gemdependency information?
Example: bundle install with  a very simple Gemfile
Bundler 1.0               RubyGems.org              specs.4.8
Bundler 1.0               RubyGems.org                    specs.4.8Bundler 1.0                        RubyGems.org        ...
Bundler 1.0                RubyGems.org                     specs.4.8      Bundler 1.0                RubyGems.org        ...
Bundler 1.0                 RubyGems.org                        specs.4.8         Bundler 1.0                 RubyGems.org...
Bundler 1.0                     RubyGems.org                             specs.4.8              Bundler 1.0               ...
etc...
Whats the problem with this picture?
Bundler 1.0 downloads and parses theentire source index - not really needed
One HTTP request per gem during  the bundler resolve algorithm
It turns out that most of the time      isn’t spent downloading
Running in Ruby 1.9.3, thesame iteration is a lot faster
Fetching metadata from http://rubygems.org/...
HTTPBundler 1.1           RubyGems.org     Fetching metadata from      http://rubygems.org/...
http://rubygems.org/api/v1/dependencies?gems=...
Example: bundle install with  a very simple Gemfile
uglifier
uglifierhttp://rubygems.org/api/v1/dependencies?gems=uglifier
uglifiermulti_json       execjs         json     therubyracerhttp://rubygems.org/api/v1/dependencies?gems=uglifier
uglifiermulti_json      execjs          json    therubyracer      http://rubygems.org/api/v1/dependencies?      gems=multi_...
uglifiermulti_json      execjs         json     therubyracer              multi_json                    libv8      http://r...
uglifiermulti_json   execjs         json    therubyracer                                        libv8                  http...
uglifiermulti_json   execjs         json    therubyracer                                        libv8                      ...
This is faster because...
3 HTTP requests, instead of many more
Each HTTP request was     very, very fast
People worked together tomake all of our lives easier!
Why Bundler 1.1 will be much fasterPat Shaughnessy@pat_shaughnessyhttp://patshaughnessy.nethttp://rubysource.com
bundle outdatedbundle outdated --pre
bundle clean
bundle install --standalone
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Why Bundler 1.1 will be much faster
Upcoming SlideShare
Loading in …5
×

Why Bundler 1.1 will be much faster

1,467 views
1,394 views

Published on

A look under the hood at exactly why Bundler 1.1 is so much faster than Bundler 1.0, and how all the great teamwork by the Bundler and RubyGems.org teams has made all of our lives easier.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,467
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Why Bundler 1.1 will be much faster

    1. 1. Why Bundler 1.1 will be much fasterPat Shaughnessy@pat_shaughnessyhttp://patshaughnessy.nethttp://rubysource.com
    2. 2. Don’t kill the messenger
    3. 3. (or praise)Don’t kill the messenger
    4. 4. Fetching source index for http://rubygems.org/
    5. 5. HTTPBundler 1.0 RubyGems.org Fetching source index for http://rubygems.org/
    6. 6. What is the “source index?”
    7. 7. Whats inside "specs.4.8"?
    8. 8. What about gemdependency information?
    9. 9. Example: bundle install with a very simple Gemfile
    10. 10. Bundler 1.0 RubyGems.org specs.4.8
    11. 11. Bundler 1.0 RubyGems.org specs.4.8Bundler 1.0 RubyGems.org prerelease_specs.4.8
    12. 12. Bundler 1.0 RubyGems.org specs.4.8 Bundler 1.0 RubyGems.org prerelease_specs.4.8Bundler 1.0 RubyGems.org uglifier-1.0.4.gemspec
    13. 13. Bundler 1.0 RubyGems.org specs.4.8 Bundler 1.0 RubyGems.org prerelease_specs.4.8 Bundler 1.0 RubyGems.org uglifier-1.0.4.gemspecBundler 1.0 RubyGems.org execjs-1.2.9.gemspec
    14. 14. Bundler 1.0 RubyGems.org specs.4.8 Bundler 1.0 RubyGems.org prerelease_specs.4.8 Bundler 1.0 RubyGems.org uglifier-1.0.4.gemspec Bundler 1.0 RubyGems.org execjs-1.2.9.gemspecBundler 1.0 RubyGems.org multi_json-1.0.3.gemspec
    15. 15. etc...
    16. 16. Whats the problem with this picture?
    17. 17. Bundler 1.0 downloads and parses theentire source index - not really needed
    18. 18. One HTTP request per gem during the bundler resolve algorithm
    19. 19. It turns out that most of the time isn’t spent downloading
    20. 20. Running in Ruby 1.9.3, thesame iteration is a lot faster
    21. 21. Fetching metadata from http://rubygems.org/...
    22. 22. HTTPBundler 1.1 RubyGems.org Fetching metadata from http://rubygems.org/...
    23. 23. http://rubygems.org/api/v1/dependencies?gems=...
    24. 24. Example: bundle install with a very simple Gemfile
    25. 25. uglifier
    26. 26. uglifierhttp://rubygems.org/api/v1/dependencies?gems=uglifier
    27. 27. uglifiermulti_json execjs json therubyracerhttp://rubygems.org/api/v1/dependencies?gems=uglifier
    28. 28. uglifiermulti_json execjs json therubyracer http://rubygems.org/api/v1/dependencies? gems=multi_json,execjs,json,therubyracer
    29. 29. uglifiermulti_json execjs json therubyracer multi_json libv8 http://rubygems.org/api/v1/dependencies? gems=multi_json,execjs,json,therubyracer
    30. 30. uglifiermulti_json execjs json therubyracer libv8 http://rubygems.org/api/v1/dependencies?gems=libv8
    31. 31. uglifiermulti_json execjs json therubyracer libv8 [ Empty ] http://rubygems.org/api/v1/dependencies?gems=libv8
    32. 32. This is faster because...
    33. 33. 3 HTTP requests, instead of many more
    34. 34. Each HTTP request was very, very fast
    35. 35. People worked together tomake all of our lives easier!
    36. 36. Why Bundler 1.1 will be much fasterPat Shaughnessy@pat_shaughnessyhttp://patshaughnessy.nethttp://rubysource.com
    37. 37. bundle outdatedbundle outdated --pre
    38. 38. bundle clean
    39. 39. bundle install --standalone

    ×