Why Bundler 1.1 will be much faster

  • 926 views
Uploaded 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.

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.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
926
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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

Transcript

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