I'm willing to consider that event emission per node is not the right choice, however, I would ask in return that you consider running every pattern over every node two times per traversal (enter and exit) is also not the right choice. Isn't this the implementation you were referring to as being 2s slower on d3?

I know this may seem like a bit of premature optimization, but we already have performance problems (see #574). Adding more work for every node will, logically, make the performance worse and if we're not considering how to mitigate that effect then we're doing the project a disservice. I'd love to measure how much worse, I just don't want to skip this over as "I'm sure it'll be fine".

For files to plow through, I think jshint.js (our current perf benchmark) is a large file due to its complexity. I'd say jQuery.js as a middle ground. For a smaller one, I'd go with KnockoutJS.