Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Created November 22, 2012 14:56
Show Gist options
  • Save balinterdi/4131563 to your computer and use it in GitHub Desktop.
Save balinterdi/4131563 to your computer and use it in GitHub Desktop.
Rails startup times
# 1.9.3-p194-perf - GC tweaks
✓ ~/code/sspinc/cartman » time bundle exec rake environment
bundle exec rake environment 5.16s user 1.60s system 95% cpu 7.067 total
✓ ~/code/sspinc/cartman » time bundle exec rake environment
bundle exec rake environment 5.23s user 1.57s system 95% cpu 7.113 total
# 1.9.3-p194-perf - No GC tweaks
✓ ~/code/sspinc/cartman » time bundle exec rake environment
bundle exec rake environment 6.60s user 1.44s system 98% cpu 8.157 total
» time bundle exec rake environment
bundle exec rake environment 6.62s user 1.47s system 98% cpu 8.258 total
» time bundle exec rake environment
bundle exec rake environment 6.58s user 1.45s system 98% cpu 8.134 total
# 1.9.3-p194 - No GC tweaks
» time bundle exec rake environment
bundle exec rake environment 10.43s user 1.68s system 97% cpu 12.455 total
» time bundle exec rake environment
bundle exec rake environment 10.36s user 1.62s system 98% cpu 12.166 total
# 40-50 seconds of load time added to "rails c" because of loading pry history which had ~17.000 rows
$ bundle exec ruby benchmark.rb | sort -r -k 6
# Gem load times
user system total real
aws-s3 0.250000 0.060000 0.310000 ( 0.328192)
mongoid 0.200000 0.090000 0.290000 ( 0.319009)
capistrano 0.210000 0.100000 0.310000 ( 0.304090)
haml-rails 0.200000 0.020000 0.220000 ( 0.232578)
sequel 0.130000 0.010000 0.140000 ( 0.159821)
pry-rails 0.100000 0.040000 0.140000 ( 0.142306)
nokogiri 0.050000 0.040000 0.090000 ( 0.137161)
devise 0.090000 0.040000 0.130000 ( 0.132916)
rspec 0.090000 0.020000 0.110000 ( 0.117483)
mongo 0.070000 0.030000 0.100000 ( 0.117093)
sass-rails 0.060000 0.030000 0.090000 ( 0.097053)
redis-activesupport 0.060000 0.020000 0.080000 ( 0.076147)
mongoid-mapreduce 0.030000 0.010000 0.040000 ( 0.060374)
resque-retry 0.020000 0.020000 0.040000 ( 0.045742)
coffee-rails 0.020000 0.020000 0.040000 ( 0.039754)
unicorn 0.010000 0.030000 0.040000 ( 0.038965)
kaminari 0.030000 0.000000 0.030000 ( 0.038581)
rails3-generators 0.020000 0.010000 0.030000 ( 0.037257)
hirb 0.020000 0.000000 0.020000 ( 0.025022)
pry-coolline 0.010000 0.020000 0.030000 ( 0.018962)
resque 0.010000 0.000000 0.010000 ( 0.017947)
cancan 0.010000 0.010000 0.020000 ( 0.016499)
airbrake 0.010000 0.010000 0.020000 ( 0.016212)
steak 0.010000 0.010000 0.020000 ( 0.016153)
pg 0.010000 0.010000 0.020000 ( 0.014571)
resque-pool 0.010000 0.000000 0.010000 ( 0.013348)
htmlentities 0.010000 0.000000 0.010000 ( 0.010961)
mongoid-rspec 0.010000 0.000000 0.010000 ( 0.010658)
guard-livereload 0.000000 0.010000 0.010000 ( 0.006958)
inherited_resources 0.000000 0.000000 0.000000 ( 0.006894)
database_cleaner 0.000000 0.000000 0.000000 ( 0.005111)
bson_ext 0.000000 0.010000 0.010000 ( 0.005049)
guard-rspec 0.010000 0.000000 0.010000 ( 0.004767)
guard-spork 0.000000 0.000000 0.000000 ( 0.004463)
spork 0.000000 0.010000 0.010000 ( 0.004403)
guard 0.000000 0.000000 0.000000 ( 0.004278)
resque-scheduler 0.000000 0.010000 0.010000 ( 0.003831)
rb-fsevent 0.000000 0.000000 0.000000 ( 0.003387)
resque_spec 0.010000 0.000000 0.010000 ( 0.003193)
jquery-rails 0.000000 0.010000 0.010000 ( 0.002800)
web-app-theme 0.000000 0.000000 0.000000 ( 0.002489)
tabletastic 0.000000 0.000000 0.000000 ( 0.002409)
foreman 0.000000 0.010000 0.010000 ( 0.002383)
guard-resque 0.000000 0.000000 0.000000 ( 0.001961)
has_scope 0.010000 0.000000 0.010000 ( 0.001838)
fivemat 0.000000 0.000000 0.000000 ( 0.001339)
fitter-happier 0.000000 0.000000 0.000000 ( 0.001272)
hashie 0.000000 0.000000 0.000000 ( 0.001141)
rails-footnotes 0.000000 0.000000 0.000000 ( 0.001105)
pry-syntax-hacks 0.000000 0.000000 0.000000 ( 0.000827)
uglifier 0.000000 0.000000 0.000000 ( 0.000727)
resque-status 0.000000 0.010000 0.010000 ( 0.000600)
resque-lock 0.000000 0.000000 0.000000 ( 0.000452)
pry-nav 0.000000 0.000000 0.000000 ( 0.000024)
responders 0.000000 0.000000 0.000000 ( 0.000021)
rails 0.000000 0.000000 0.000000 ( 0.000021)
redis_failover 0.000000 0.000000 0.000000 ( 0.000009)
factory_girl_rails 0.000000 0.000000 0.000000 ( 0.000009)
sequel_pg 0.000000 0.000000 0.000000 ( 0.000007)
rb-inotify 0.000000 0.000000 0.000000 ( 0.000006)
squealer 0.000000 0.000000 0.000000 ( 0.000005)
simplecov-rcov 0.000000 0.000000 0.000000 ( 0.000004)
simplecov 0.000000 0.000000 0.000000 ( 0.000004)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment