This project is archived and is in readonly mode.

#1660 ✓stale

Callbacks static analysis optimizations

Reported by josh | December 28th, 2008 @ 09:03 PM | in 3.0.2

ActiveSupport::Callbacks are used though out Rails so any micro-optimizations "may" go a long way.

At the moment, the callback's object is checked every time the callback is run, see Callback#evaluate_method. But we do know the type of this object when the callback object is created.

The idea is to have Callback#initialize generate a the "Callback#call" method (omg metaprogramming) that runs the conditionals :if/:unless then fires the callback.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>