This project is archived and is in readonly mode.
add verbose output to rails startup if RAILS_VERBOSE_STARTUP env is true
Reported by Andrew Arrow | June 11th, 2009 @ 06:10 PM | in 3.x
Once you have lots of gems and plugins and routes start can take a long time. It helps a lot to see verbose output of what is taking so long. This patch file make rails show nice output like:
starting 0.0000
check_ruby_version 0.0016
install_gem_spec_stubs 0.0016
set_load_path 0.0006
add_gem_load_paths 0.0330
============== REQUIRE FRAMEWORKS =================
active_record 0.0107
action_controller 0.0023
action_view 0.0023
action_mailer 0.2798
active_resource 0.3606
set_autoload_paths 0.0001
add_plugin_load_paths 0.1356
load_environment 0.0736
preload_frameworks 0.0000
initialize_encoding 0.0000
initialize_database 0.3531
initialize_cache 0.0059
initialize_framework_caches 0.1401
initialize_logger 0.0019
initialize_framework_logging 0.0001
initialize_dependency_mechanism 0.0000
initialize_whiny_nils 0.0035
initialize_time_zone 0.0000
initialize_i18n 0.0000
initialize_framework_settings 0.0002
initialize_framework_views 0.0017
initialize_metal 0.0148
add_support_load_paths 0.0000
etc.
if the env var RAILS_VERBOSE_STARTUP is set.
Comments and changes to this ticket
-
Nick Quaranto June 11th, 2009 @ 06:21 PM
I love this idea, but I'm not necessarily sure if this should be in the core. I think this extended out to more parts of the framework could be a great way to benchmark what's slow about an app and even point out parts that need refactoring. If you could wrap this up in a decent plugin/gem and it could go far.
-
Andrew Arrow June 11th, 2009 @ 07:32 PM
Thanks Nick! Trouble is I need to hack into rails before any plugin or gem is loaded. By the time it gets to loading my gem, it's too late. But the patch as is needs some work. I just threw it in my local copy of rails and have been using it. I figured some rails core guru could take it from here and implement it cleaner if they see the value.
-
Daniel Schierbeck June 12th, 2009 @ 12:45 AM
- no changes were found...
-
Daniel Schierbeck June 12th, 2009 @ 12:45 AM
Hi Andrew
I like the concept, but I think the patch definitely needs to be cleaned up. I've fixed some of it; take a look if you want :-)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>