Rails 3.1.0.rc1 big latency in development

I encounter a problem when I upgraded my rails 3.0 project to
3.1.0.rc1. Everything was working fine, but when I reloaded a page it
took about 5s to load it. I investigated a problem and I found out
that on every request, rails are reloading all the classes (because of
development mode and config.cache_classes = false). The flow looked
like this

  • GET html page
  • reload all models (and maybe other files) (500ms)
  • serve html (< 10ms)
  • GET application.js
  • reload all models (500ms)
  • serve application.js
  • GET application.css
  • reload all models (500ms)
  • serve application.css
  • load 10 more images in the same way (+5s)

This makes development much harder. Is it possible, to disable class
reloading when the requested file comes from asset path (static
content)? It would solve all my problems.

Also I am using a Mongoid and I think it is slowing reload time to
500ms.

My gemfile looks like this:

source ‘http://rubygems.org
gem ‘rails’, ‘3.1.0.rc1’
gem ‘jquery-rails’
gem ‘mongoid’, ‘~>2.0’
gem ‘bson_ext’
gem ‘devise’
gem ‘omniauth’
gem ‘haml’
gem ‘cancan’
gem ‘formtastic’, ‘~> 1.2.3’
gem ‘tiny_mce’
gem ‘kaminari’
gem ‘json’
gem ‘sass’
gem ‘coffee-script’
gem ‘uglifier’

The problem has been solved in rails 3.1.0.rc2.