Skip to content

Instantly share code, notes, and snippets.

@Locke23rus
Created November 8, 2012 21:25
Show Gist options
  • Select an option

  • Save Locke23rus/4041733 to your computer and use it in GitHub Desktop.

Select an option

Save Locke23rus/4041733 to your computer and use it in GitHub Desktop.
Profile booting of a big rails app
$ rbx -Xprofile -S rake environment
Thread 1: total running time: 274.836778401s
% cumulative self self total
time seconds seconds calls ms/call ms/call name
------------------------------------------------------------
3.94 272.01 19.40 609565 0.03 0.45 Array#each
2.01 15.80 9.91 875396 0.01 0.02 Rubinius::IdentityMap#insert
1.68 8.28 8.28 1075 7.70 7.70 GC.collect_young
1.64 8.37 8.10 2155688 0.00 0.00 Array#[]
1.53 18.00 7.54 740930 0.01 0.02 Hash#[]
1.48 25.91 7.31 47008 0.16 0.55 Array#map
1.47 18.89 7.23 7159 1.01 2.64 Rubinius::Melbourne#string_to_ast
1.44 8.47 7.12 867609 0.01 0.01 FFI::MemoryPointer.new
1.44 17.39 7.08 867571 0.01 0.02 FFI::Struct#initialize
1.43 7.06 7.06 16 441.26 441.26 GC.collect_mature
1.37 9.41 6.77 8116 0.83 1.16 Rubinius::LookupTable#each
1.36 28.72 6.70 863429 0.01 0.03 File::Stat.create
1.35 13.42 6.65 822067 0.01 0.02 Hash#find_item
1.28 11.17 6.31 841987 0.01 0.01 Rubinius::IdentityMap#include?
1.16 5.18 5.71 170807 0.03 0.03 Array#hash
1.15 7.72 5.64 42947 0.13 0.18 Rubinius.add_method
1.11 5.77 5.47 2579060 0.00 0.00 Rubinius::IdentityMap#match?
1.09 36.24 5.36 863424 0.01 0.04 File::Stat.stat
1.08 18.92 5.33 114797 0.05 0.16 Racc::Parser#_racc_do_reduce
1.04 44.16 5.11 845611 0.01 0.05 Rubinius::CodeLoader#check_path
0.99 10.70 4.87 310526 0.02 0.03 Hash#[]=
0.96 4.92 4.74 2488188 0.00 0.00 BasicObject#!
0.95 4.67 4.66 87481 0.05 0.05 Rubinius::VM.reset_method_cache
0.85 6.10 4.19 642382 0.01 0.01 Rubinius::Melbourne::process_transforms<103> {}
0.83 5.60 4.08 667326 0.01 0.01 Kernel#respond_to?
0.73 4.48 3.58 289944 0.01 0.02 String#<<
0.68 9.27 3.37 118513 0.03 0.08 Thread.detect_recursion
0.64 29.72 3.16 175615 0.02 0.17 Racc::Parser#_racc_evalact
0.58 7.41 2.84 192590 0.01 0.04 Rubinius::Generator#find_literal
0.56 2.92 2.78 2030670 0.00 0.00 Array#<<
0.56 4.68 2.75 281547 0.01 0.02 Hash#new_bucket
0.55 2.77 2.73 868498 0.00 0.00 FFI::Platform::POSIX.stat
0.54 4.38 2.65 11018 0.24 0.40 File.expand_path
0.52 6.08 2.57 385676 0.01 0.02 Hash#default
0.51 2.71 2.53 229672 0.01 0.01 Array#[]=
0.51 3.47 2.51 8576 0.29 0.40 Rubinius.attach_method
0.50 4.67 2.45 25752 0.10 0.18 Rubinius.add_defn_method
0.49 38.04 2.44 849841 0.00 0.04 Rubinius::CodeLoader#loadable?
0.49 2.49 2.41 222499 0.01 0.01 Rubinius::IdentityMap#promote_row
0.47 17.90 2.30 21613 0.11 0.83 Rubinius::AST::If#bytecode
0.47 49.32 2.29 156468 0.01 0.32 Class#new
0.46 2.92 2.29 335385 0.01 0.01 Rubinius::Generator#set_line
0.46 44.76 2.27 120168 0.02 0.37 Rubinius::ThrownValue.register
0.46 2.45 2.26 181332 0.01 0.01 Array::hash<616> {}
0.46 2.44 2.25 867563 0.00 0.00 FFI::Struct#size
10,287 methods omitted
10,332 methods called a total of 147,738,521 times
$ ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
$ time rake environment
real 0m32.004s
user 0m19.193s
sys 0m0.760s
$ ruby -v
rubinius 2.0.0rc1 (1.9.3 6e5968d8 2012-11-02 JI) [x86_64-unknown-linux-gnu]
$ time rake environment
real 1m35.533s
user 1m40.110s
sys 0m1.576s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment