It was recently brought to our attention that Siesta performed poorly if you had a test producing several hundred assertions. We did a quick investigation and found that the Ext JS grid was doing a re-layout of the grid everytime a new assertion record was added to the store. This meant loads and loads of code was being executed for no reason. We’ve now put a fix in place, and more importantly – a test to prove this doesn’t happen again. Here’s how we did it:

First we wrote a simple test to detect this bug by counting the amount of layouts performed in the entire Siesta UI before and after manipulating the UI. You can also use tests like this one in your Sencha applications to make sure your containers aren’t doing too many expensive layout cycles. Note that we’re actually testing and rendering an entirely new and sandboxed copy of Siesta inside of Siesta.

Below is the patch added to the AssertionGrid class, which prevents an internal method from being called (ultimately triggering a relayout):

This patch will be included in the next release and should speed up your test suite when you use the Siesta UI. Thanks to Brian Moeskau at Extensible for pointing this out to us!

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>