Rails server start up time is very slow with upgrade
Thanks for pitching in folks. Just now, got it resolved.
I am using turbo-sprockets-rails-4 in which preload assets is enabled by default for dev environments.
added below config in config/environments/development.rb
TurboSprockets.configure do |config|
config.preloader.enabled = false
end
now server startup time is as fast as rails3
this is mentioned in their readme itself, but missed it while skimming through
Slow localhost load running Rails and Webrick
WEBrick is doing a reverse DNS lookup on connecting IPs by default. In other words, it's trying to see if your IP address is associated with a domain name. This is unnecessary and takes too long, so you can disable it.
Open the file "l/ruby/lib/ruby/1.9.1/webrick/config.rb"
and locate the line with ":DoNotReverseLookup => nil"
.
Change nil
to true
.
Enjoy!
Localhost is taking abnormally long time to load any page
Hard to give a solution based on the little information you give, so try to narrow it down. I would say that these three causes seem the most likely:
- the database is slow. You can check this if your queries take a long time (check the logs). Perhaps you are using a slow connector (i.e. the default Ruby MySQL library), or your indexes haven't made it to your new machine.
- Mongrel is slow. Check by starting it with Webrick and see if that's any better
- your computer is slow. Perhaps it's running something else that's taking up CPU or memory. See your performance monitor (application to use for this differs per OS).
Related Topics
Respond_To' VS. 'Respond_To_Missing'
"Rmagick" Gem Installation Issue
Rails 5.2 Active Storage Add Custom Attributes
Neither Ruby and Nor Irb Can Load .Rb File in Current Directory
Cleanest Way to Create a Hash from an Array
Rails Convert String to Number
Rails Belongs_To Association (With :Class_Name) Returns Nil
Get Substring After the First = Symbol in Ruby
How to Export a Ruby Array from My Heroku Console into CSV
Declaring Instance Variables Iterating Over a Hash!
How to Check from Ruby Whether a Process with a Certain Pid Is Running
Postgresql Gem Pg Was Unable to Install
Ruby: Get All Keys in a Hash (Including Sub Keys)
Ruby Method with Maximum Number of Parameters
Possible to Alias a Belongs_To Association in Rails