ExtJS Performance – Element click events

A question appeared on the ExtJS forums today regarding how to bind event listeners on multiple links that are generated from the server.  Bind an event listener to each link, right?  Wrong!  This is wrong in the sense that it wastes system resources and is unnecessary.  Can you imagine how much resources TreePanel would take up if it bound a click listener on every single node element!? Oh wait… that’s probably what you though it did :-).  But it doesn’t. 
Continue reading

ExtJS Performance – Event Listener Cleanup

Its a pretty simple code snippet but the overarching topic, performance (especially in ExtJS), can be complicated and developers really need to be cognizant of performance impacts.  Especially so when its running on the client which you have no control over the performance specs of the machine.

There has long been the problem in Ext with the issue of cleaning up event listeners after the listening component has been destroyed.  Until now, developers have had to code custom destructors to handle this cleanup.

Continue reading