enthought/enaml — pull request #209 by sccolbert (2012-11-24 19:20:12+00:00)
Title: Code tracing

This refactors the inverters|monitors paradigm into an easier to use and more efficient tracer pattern. This allows the Enaml compiler to generate all of the code objects up-front, once, instead of having to disassemble and reassemble new code objects each time a widget is created in order to use the correct context operator. This new version creates code objects which accept tracers/inverters as input, and calls methods on them at the proper times. So instead of create n x m code objects, we now create just n.

Execution speed is also improved, by way of this being a more efficient pattern in general. There is also a new optimization which only rebuilds the internal notifiers when a compute key value for an expression has changed. The key value is computed based on the dependencies found during code tracing.