O'Reilly logo

JavaScript at Scale by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Communication overhead

One advantage of directly invoking a method on a component is that there's very little overhead involved. When all inter-component communication is brokered through an event triggering mechanism, there's no way to escape at least a little overhead. In fact, overhead associated with this indirection is hardly noticeable; it's other overhead factors that can cause scalability issues.

In this section we'll look at event triggering frequency, callback execution, and callback complexity. Each of these has the potential to degrade the performance of our software to the point where it is unusable.

Event frequency

When our software has only a handful of components, there's a fundamental limit on the frequency of events. Where event ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required