views:

1503

answers:

2

In our industrial automation application, we need to capture and display the data in the milliseconds.

We have data binding between data grid control and a DataTable object. We have around three hundred records which needs to be display in the grid. So we update the 300 records every time we get the records.

Example

       TabularViewTable tvt = _presenter.WorkItem.Items.Get<TabularViewTable> ("TabularViewTable");

        foreach (DataRow row in tvt.Rows)
        {
            row["Value"] = GetDataFast(row["Name"]);                
        }

After connecting 10 devices, the CPU usage goes 15%. How to improve the performance using DataTable or using some custom data source

Regards,

Krishgy

+2  A: 

You should seriously reconsider your user interface:

  • Is it really necessary to display 300 values? Ordinary human cannot concentrate on more than 7 things simultaneously,
  • Even if you lower number of parameters, there is frequency of refresh that seems to high to be practical.

You probably should do following:

  • create a dashboard with graphical representation of most important data (graphs, gauges, ...)
  • create drill down forms and reports, so that user can see what happened with system in any given period
zendar
A: 

For starters you need to switch from a DataTable to a DataReader as it is much faster. Secondly I would look at a Lazy Loading architecture. Bind 50 entries and when they scroll to the bottom Bind/Load another 50.

runxc1 Bret Ferrier