Created
April 28, 2010 10:47
-
-
Save dolzenko/381991 to your computer and use it in GitHub Desktop.
Ruby 1.9 slow require WTF
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
> cat 1.rb | |
gem 'facets', '2.8.4' | |
require 'facets' | |
> /usr/bin/time -p ruby -v 1.rb | |
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux] | |
real 0.39 | |
user 0.03 | |
sys 0.16 | |
> /usr/bin/time -p ruby -v 1.rb | |
ruby 1.9.2dev (2010-04-02 trunk 27162) [i686-linux] | |
real 6.42 | |
user 2.12 | |
sys 0.92 | |
> ruby-prof 1.rb # with ruby 1.9.2dev (2010-04-02 trunk 27162) [i686-linux] | |
Thread ID: 76994260 | |
Total: 2.310000 | |
%self total self wait child calls name | |
71.43 2.12 1.65 0.00 0.47 377 Kernel#require(d2) | |
16.02 0.44 0.37 0.00 0.07 101 Kernel#require(d3) | |
7.79 2.30 0.18 0.00 2.12 39 Kernel#require(d1) | |
1.73 0.04 0.04 0.00 0.00 20979 Hash#default | |
0.87 0.03 0.02 0.00 0.01 9 Kernel#require(d4) | |
0.43 0.01 0.01 0.00 0.00 27 <Class::Dir>#[] | |
0.43 0.01 0.01 0.00 0.00 5 Array#select | |
0.43 0.01 0.01 0.00 0.00 847 Module#method_added | |
0.43 2.31 0.01 0.00 2.30 1 Kernel#load | |
0.43 0.01 0.01 0.00 0.00 3 Kernel#require(d5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment