2010: The year Ext JS takes over
On January 1st 2010 I officially joined Ext JS to take over the role of lead developer. After livin
Just as with Jacky's session, I didn't plan on making a separate post about this, but again the content was so good and I ended up taking so many notes that it also warrants its own space. To save myself from early carpal tunnel syndrome I'm going to leave this one in more of a bullet point format.
Ext JS has been getting more flexible with each release. You can do many more things with it these days than you used to be able to, but there has been a performance cost associated with that. In many cases this performance degradation is down to the way the framework is being used, as opposed to a fundamental problem with the framework itself.
There's a whole bunch of things that you can do to dramatically speed up the performance of an app you're not happy with, and Nige "Animal" White took us through them this morning. Here's what I was able to write down in time:
Nige identified three of the top causes of sluggish apps, which we'll go through one by one:
Suspend store events when adding/removing many records. Otherwise we're going to get a full Ext JS layout pass for each modification
Ditto on trees (they're the same as grids) Coalesce multiple layouts. If you're adding/removing a bunch of Components in a single go, do it like this:
Container#add accepts an array of items, which is faster than iterating over that array yourself and calling .add for each one. Avoid layout constraints where possible - in box layouts, align: 'stretchmax' is slow because it has to do multiple layout runs. Avoid minHeight, maxHeight, minWidth, maxWidth if possible
Big problem - overnesting. People very often do this with grids:
Better:
This is important because redundant components still cost CPU and memory. Everything is a Component now - panel headers, icons, etc etc. Can be constructing more Components than you realize. Much more flexible, but easy to abuse
New plugin at https://gist.github.com/ExtAnimal/c93148f5194f2a232464
On a real life large example contributed by a Sencha customer:
Bad practices: 5187ms (IE8) Good practices: 1813ms (IE8) 1300ms vs 550ms on Chrome (same example)
Colossal impact on the Ext.suspendLayout example - 4700ms vs 100ms on Chrome
This is definitely a talk you'll want to watch when they go online. It was absolutely brimming with content and the advice comes straight from the horse's mouth. Nige did a great job presenting, and reminded us that performance is a shared responsibility - the framework is getting faster as time goes by, but we the developers need to do our share too to make sure it stays fast.
For further insights on enhancing the performance of your Ext JS applications, consider reading about advanced performance optimization techniques in Ext JS 4 and the impact of efficient application architecture. Additionally, you might find the introduction of Ext JS 3.2 interesting, as it focuses on new features and improvements aimed at speeding up your web development projects.
On January 1st 2010 I officially joined Ext JS to take over the role of lead developer. After livin
I've been making a few updates to the ExtJS API documents application recently. The actual updates
We pushed out a beta release of Ext JS 3.2 this morning. Although we've marked it as beta, it's a pr