Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
Speed problem with Excel Export Function
posted

Hi,

we need some help with the excel export function of the infragistics ultragrid version 11.2.

Situation:

Our application handles a high amount of data (currently, over 35,000 rows. each row with 20 sub rows) and provides a functionality to export filtered (and non-filtered) data to an excelsheet.

Problem:

The infragistics excel export function needs round-a-bout an hour to export the 700,000 rows (35,000 * 20) to an excelsheet.  Even if we try to export only a small amount of rows (place a row filter)!

 Technical details:

For each row we intercept the InitializeRow event and set some object properties:

If e.Row.IsFilteredOut Then
   e.SkipRow = True
   e.SkipDescendants = True
   e.Row.Band.ColHeadersVisible = False
   e.Row.Band.HeaderVisible = False
End If

We tried to export the rows with and without handling the InitializeRow event, but the result is the same.

Sample:

We add a sample application to this post, which generates a xml file with 10000 main and 20 sub rows. This example shows the simplified way of our export procedure. All other parts of our export functionality have been checked for performance issues and we come to the conclusion that only the excel export function of the ultragrid can be the bottle neck of our application.

Our question is:

Is there an easier/faster way to export filtered grids with the excel exporter? Or we doing something basicly wrong?

Sincerely,

Kai

ExcelExportTestApplication.rar
Parents
  • 469350
    Offline posted

    Hi Kai,

    I don't think you are doing anything wrong, I think this is just a normal limitation of what you are trying to do.

    When the grid displays on the screen, it's optimized to create only the objects it needs. So in this sample you attached here, the grid will end up creating an UltraGridRow object for every root-level row, but the child rows are not loaded until you expand a parent row.

    When you export the grid, it has to export everything, so that means it has to load all of the data into memory. Not only that, but the grid is designed to clone the DisplayLayout. This allows you to alter the layout used for exporting without altering the grid on-screen. But it also means a performance hit up front while the grid creates what is essentially a whole new grid with all of the rows - most of which have not been loaded into the on-screen grid.

    This is why InitializeRow fires for every row. It's firing because the rows are being cloned. The filtering is then applied to the cloned rows so they don't export. But they have to be created first before they can be filtered out.

    Ultimately, exporting a grid with 700,000 rows is just not practical. Of course, displaying 700,000 rows in a grid on the screen isn't really practical, either. No human user could possible deal with such a large set of data in any meaningful way, even with filtering. So my recommendation would be to reduce the amount of data you are binding to the grid at any one time.

Reply Children