So I had the time and figured I’d try out Ext.Direct and see what happened. A little background on what this is: ExtJS uses the traditional AJAX calls to communicate with the server, and that’s definitely the easiest way to execute calls. The issue comes up when you have a bunch of little calls that need to be executed on page load. For example, on the tool I'm developing I have 16 stores that each make their own call to ColdFusion to populate their data (little things like dropdown stores, and bigger things like stores that are used to populate the actual interface etc). After a certain number of calls that are executed concurrently, the browser itself will STOP making calls so as to not flood the server with hits (essentially stopping itself from being a mini Denial of Service attack). The problem with this is, depending on how many calls you make at once it can take a while to get everything needed back.
So Ext Direct is one method of getting around this. It sets up an API that allows for the database to accept a bundle of calls and then distribute those calls as necessary to the different functions on the server side. Then it bundles those results into one result back to the browser, getting around that browser restriction that they all have. There are other features but that’s the one I’m talking about for the timing breakdowns.
Anywho, I put together some metrics since I compiled everything from my master branch and then a separate compilation for my master-ExtDirect branch. I did a few runs each for refreshing application data (clearing the cache in ColdFusion), and then for just going to the page (no f5, just hitting enter. There is a difference ;)) Also Firebug uses 2 different times. One from total time executing and another from page hit to ‘onload’ execution,.
Using ExtDirect: Total/Onload
- appRefresh Average: 1063.5ms/937.5ms
- Page Hit Average: 926ms/893.25ms
Regular AJAX calls: Total/Onload
- appRefresh Average: 3200ms/771.33ms
- Page Hit Average: 2770ms/883ms