Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable costly eventManager support when unused.
For every event that we observe (which is basically all bubbling events in the DOM) we would iterate the entire `parentView` structure of the target elements view looking for an `eventManager` (and then we would dispatch the event to the `eventManager` instead of the view itself). This support has existed for a *very* long time, and is generally unused in most applications. Unfortunately, the iteration upwards through the view heirarchy is much more costly than we would like. This is currently being done for events like `mouseenter` and `mousemove` and that very very very few applications (if any) actually take advantage of this support. This changes the `EventDispatcher` to (by default) disable support for `eventManager`'s (and avoids the costly `parentView` iteration) until we actually instantiate a component that has an `eventManager` property. In the future, we should deprecate specifying an `eventManager`, but this makes the feature much more "pay as you go".
- Loading branch information