Ember 2 performances, is javascript event delegation in #each automagically? How to coalesce similar listeners?


#1

I’m reading a lot (for study) about “Event delegation” and also because in this video: https://www.youtube.com/watch?v=udix3GZouik (minute 22:28) Alex Blom talks about: “Coalesce similar listeners” for performance reasons.

image

My question is: is Ember automagically performing about this problem?

If I have an #each with many div in it how to coalesce listeners on the parent div? Does Ember do it in my place?


#2

Ember already delegates all events to the root element of the application (defaults to <body> if you don’t define one).
As long as none of your view / 3rd-party plugins set up additional handlers directly, all events of your application are caught at its root element

See the documentation.