rails/rails — pull request #3843 by josevalim (2011-12-03 11:53:59+00:00)
Title: Faster explain

This is a bit hard to benchmark and pinpoint as a whole but I did isolation benchmarks. This commit:

* Avoids constant lookups
* Caches the result of Thread.current in local variables
* Avoid &block
* Avoid subscribed blocks (and consequently avoid expiring notifications internal caches). In fact, the API was removed to discourage the behavior.