I’ve been banging my head on the wall for several days now. My application is very slow in development mode. Good time is spent on servicing assets (especially images). Each request is very slow, it takes up to 7 seconds to load a simple 50kb jpeg. The total page load time can be up to two minutes ...
I suspect there is a link to automatically download the code, because when I turn on the classes, caching loads much faster (maximum several hundred ms). This is not a solution, because since I need to code, I cannot restart the server every time I make changes.
Here is my config / development.rb
Rails.application.configure do
config.cache_classes = false
config.eager_load = false
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.reload_classes_only_on_change = true
config.action_mailer.raise_delivery_errors = false
config.active_support.deprecation = :log
config.active_record.migration_error = :page_load
config.assets.debug = false
config.assets.digest = true
config.assets.raise_runtime_errors = true
config.action_mailer.default_url_options = { host: '127.0.0.1', port: 3000 }
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :test
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_options = {from: 'no-reply@example.com'}
config.web_console.whitelisted_ips = '0.0.0.0/0.0.0.0'
end
and initializers /assets.rb
Rails.application.config.assets.version = '1.0'
Dir.glob("#{Rails.root}/app/assets/images/**/").each do |path|
Rails.application.config.assets.paths << path
end
Any insight would be greatly appreciated!