github/rails — pull request #22 by charliesome (2013-10-23 20:50:44+00:00)
Title: Don't globally invalidate the method and constant cache every view render

Currently when Rails renders a view, it instantiates a new `ActionView::Base` object and extends the controller's `master_helper_module` into it.

We use class hierarchy method cache invalidation, so this doesn't *seem* too terrible, but in the case that any helper modules have constants defined in them, this will force a global invalidation.

In this pull request, I've changed `ActionController::Base` to cache a class that has the master helper module pre-included. Then when rendering a view, instead of extending an object and blowing the method cache every single time, we can just create a new instance of this cached class.

cc @github/perf @github/rails