errbit/errbit — pull request #433 by danielbeardsley (2013-03-10 09:40:45+00:00)
Title: Huge Performance Improvements

### Largest change

Enable the identity map for Mongoid. This allows subsequent finds for
the same object to skip the DB and use an in-memory store of all
retrieved records.

In many cases this reduces the number of DB queries from _hundreds_ to a
few tens.

This is particularly noticable when showing lists of problems.
Previously each `problem.app` reference caused a `App.find()` using
the `app_id`, now it's an in-memory lookup.

### Other changes
* Restore faster `app.==()` method from Mongoid
* Use a predefined scope in one place.

Should largely fix #432