I'm using Rubinius 2.2.10 and Rails 4.1.6.
since upgrading from rails 3.2, my development environment takes a very long time to load with sprockets' javascript_include_tag whenever the javascript changes. 44 seconds. (I'm using sprockets-2.11.0)
in my development.rb there is this option:
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true
but even if I set it to false it takes the same amount of time.
There is a fair bit of javascript in the app (bootstrap and datatables), but it never took that long on Rails 3.2. Any Idea why this is happening and how to speed it back up?
here is my full development.rb file -
require File.expand_path(File.join(File.dirname(__FILE__), 'environments_module.rb'))
include EnvironmentsModule
Rails.application.configure do #- Registration::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
APP_CONFIG= YAML.load_file(File.join(Rails.root, "config", "calm_app.yml"))
config.communication_host_url = "http://localhost:3004"
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Do not eager load code on boot.
config.eager_load = false
# Show full error reports and disable caching
config.consider_all_requests_local = true
#CACHING
# config.cache_store = :memory_store, { size: 64.megabytes }
config.cache_store = :mem_cache_store, {:pool_size => 5, :compress => true}
#not specifying a server above, this means memcache server is running on localhost on default port - this may not be ideal see the rails guide
config.action_controller.perform_caching = true
## # Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = APP_CONFIG['invitation_mailer']['default_url_options']
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :sendmail
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
#log ActiveRecord
ActiveRecord::Base.logger = Logger.new(STDOUT) if defined? Rails::Console
config.assets.js_compressor = Uglifier.new(mangle: false) # default is `true` in Rails
config.assets.debug = true
config.assets.raise_runtime_errors = true
config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[Exception]",
:sender_address => %{support@test.com},
:exception_recipients => %w{calm@test, calmernst@test.com, rya@test.com}
}
# auto rotate log files, keep 2 of 3MB each
config.logger = Logger.new(config.paths['log'].first, 1, 3*1024*1024)
config.log_level = :debug #:info
#this is the config for the bullet gem which helps to identify inefficient queries in development
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true # see results in log/bullet.log
end
end