I am working on a rails 3.2.6 project in development mode in Windows, my colleague is using Mac. We are both using identical configuration. For him page access is fast but for me it takes an age because it reloads all of the classes before returning every request, even a simple image GET request.
in development.rb we have
config.cache_classes = false
config.reload_classes_only_on_change = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
If I modify this to the following, it is fast as the classes are cached however when I make changes I have to restart for them to take effect.
config.cache_classes = true
#config.reload_classes_only_on_change = true
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
I am using Rails 3.2.6, JRuby 1.7, Windows 7. There is a rails_dev_tweaks gem available but this should not be necessary as of rails 3.2. Has anyone else seen this problem before? Am I configuring something incorrectly? Is this feature even supposed to work in Windows?
I couldn’t find any reference to this issue in searches and I assume Rails 3.2.x is heavily used on Windows so I assume that it is something simple I am doing incorrectly. Thanks.
This turned out to be latency in listing all the files in the folder on Windows. It does this in case a file has been added so can add it to the cache.
Same happens on Mac and Unix except it is much faster so not as noticeable
Full answer here:
https://github.com/rails/rails/issues/7254