Realtime cell highlighting

Posted on | February 15, 2012 | No Comments

Financial markets are lately becoming increasingly volatile and this generates a huge volume of information that has to be displayed in trading applications. Any changes of price or the number of sales/purchase offers for various financial instruments have to be displayed at trader’s screen. Visually it looks as highlighting relevant grid fields for specified time.

Practically any well-designed application should support highlighting of data that changes in real time. However, practical implementation of this feature may be complicated and may significantly impact application performance, thus limiting its usability at high market volatility environment.

In classic implementation of cell highlighting concept the programmer has to store last update time for each grid cell. When cell value changes, the cell should be redrawn with a new color (e.g. when price changes – with green or red background depending on change type). After a certain time interval cell background color should be restored. However, this seemingly simple task is usually hard to implement. Firstly, this depends on data storage method and data volume. If there are too many rows and columns, memory consumption can be fairly high. Secondly, it is necessary to track highlighting time for each cell to restore colors. Some cells may be outside visible area, and this should be considered to save CPU resources. Besides, it is not possible to create high-performance applications without knowing working principles of the painting system and its optimal usages.

Grid grid = ...;
Cell cell = grid.Rows[10]["Bid"];
cell.Highlight(TimeSpan.FromSeconds(2), Color.Blue);

 

.Net Grid uses various optimizations that enable creation of efficient and high-performance applications. The programmer has only to use provided convenient interface and concentrate on application logic.

Dapfor .Net Grid realtime updates

 

The performance of the .Net Grid using various benchmarks demonstrates excellent results. It was really hard work to achieve such high values for various performance indicators. Here are some of them:

  • High insertion rate: 100 000 rows/second.
  • High removal rate: 600 000 rows/second
  • High grouping rate: 60 000 rows/second
  • High real-time regrouping rate: 10 000 rows in a grid of 5 000 rows per second
  • High real-time filtering rate: 7 000 rows in a grid of 5 000 rows per second
  • Productive sort algorithms: 5 000 sorts in a grid of 5 000 rows per second
  • Low memory consumption: The grid of 100 000 rows will consume 16 MB

Professionals working with complex systems will surely appreciate our efforts that make the code simpler and improve its reliability.

Comments

Leave a Reply