Grid Performance - Round 2

by Martin TylerAugust 28th, 2008

Performance of a rich internet application (RIA) can manifest itself in a number of ways, such as responsiveness of user interaction and speed of rendering. This article is a follow-up to Performance of Grids for Streaming Data and covers Firefox 3.

These tests all use Liberator as a source of data and use three implementations of grids:

  1. A simple HTML table using SL4B for real time data.
  2. The Caplin Grid using SL4B for real time data. This grid is part of the Caplin Trader product and is designed specifically for financial trading applications.
  3. A Flex grid using a native RTTP (connection to Liberator) implementation.

Each grid subscribes to a number of subjects to populate the grid. The tests use a test feed that sends updates once per second for each subject subscribed to and provides six fields per update.

These tests are intended to compare Ajax and Flex across different browser versions.

Browser speed

First up, we have a test of different browser versions using the simple HTML table grid implementation

It is clear that Firefox 3 has pushed the performance of JavaScript a long way.

Ajax and Flex

This test compares the Caplin Grid in various browsers against the Flex grid. Since the performance of Flex is not heavily dependent on browser version we only show a single plot for Flex.

This test goes up to 100 rows in the grids. The grids themselves are displaying all 100 rows, but the browser window is not big enough to display the whole grid and only 40 are in view.

This chart shows a few things:

  1. The different browser versions have the same effect on the Caplin Grid as they did on the HTML table with Firefox 3 leading the way.
  2. The Flex grid performs better than the Caplin Grid on Internet Explorer 7 and Firefox 2, but on Firefox 3 the Caplin Grid performs better than Flex.
  3. Both Flex on Firefox 2 and the Caplin Grid on Firefox 3 appear to have some optimizations for updates not on the screen, although this is small and may just be down to accuracy of the tests. This is shown when the rows increase above 40.

Larger Grids

This test compares the HTML Table implementation against the Caplin Grid and the Flex grid for large amounts of data. The test has only 25 rows in view, this time using whatever means each implementation has to handle this. The Caplin Grid and Flex grid both handle this themselves and present scrollbars, whereas the HTML Table implementation simply puts the table in a scrollable div element.

The Caplin Grid does not subscribe to data that is not in view, but makes subscriptions when necessary as the user moves the scrollbar. The chart shows how this leads to perfect scalability as it does not matter how many rows are in the data set.

The Flex grid, although it still subscribes to all the rows does not attempt to render them which is clearly a large part of the work involved since it also has very good scalability, although the CPU Usage still goes up for out of view rows since it is still handling the updates coming in, just not displaying them.

The HTML Table plots show that the scrollable div element does not really help with out of view rows as the CPU usage increases linearly with the rows.

The chart also shows that Flex is not faster than the JavaScript implementations on Firefox 3.

Conclusions

From a performance perspective it is clear that Flex performs well, but the fast moving world of browsers is improving the performance of Ajax applications all the time. The grid test results show Ajax running on Firefox 3 outperforms Flex for this kind of application.

One Response to “Grid Performance - Round 2”

  1. Caplin Chrome « Coding the markets Says:

    [...] It would be good to see some commentary over at CometDaily. Perhaps Martin could run his grid benchmark in Chrome. Posted in career, coding [...]


Copyright 2015 Comet Daily, LLC. All Rights Reserved