Blogs

This Blog

News

Favorite Posts

Archives

ctodx

Discussions, news and rants from the CTO of DevExpress, Julian M Bucknall

Sneak peek: improving the performance and memory footprint of Excel and PDF export from WinForms grid (coming in v2011.1)

Through valuable customer feedback and our own testing, we realized that our exporting engine wasn’t all it was cracked up to be, especially with regard to raw performance and memory usage. The call went out: increase the performance, and, at the same time, reduce the amount of memory used. I’ve now received the results of our benchmark and it’s time to reveal all.

photo © 2008 Nathan | more info (via: Wylio)What we used. The latest version of DXperience v2010.2 and the current internal alpha build for DXperience v2011.1.

What we timed/measured. We used 4 benchmarks:

  1. XtraGrid with 50,000 records and 5 columns (1 integer, 1 date, 1 text, 1 float, 1 checkbox). A quarter of a million cells.
  2. XtraGrid with 100,000 records and 5 columns (1 integer, 1 date, 1 text, 1 float, 1 checkbox). Half a million cells.
  3. XtraGrid with 50,000 records and 20 columns (1 integer, 1 checkbox, 18 text with random contents, between 8 and 10 chars). A million cells.
  4. XtraGrid with 100,000 records and 20 columns (1 integer, 1 checkbox, 18 text with random contents, between 8 and 10 chars). Two million cells.

The platform. Reasonably standard developer box running Windows 7, 64-bit. (32-bit can’t process this amount of data.)

The results.

  v2010.2 v2011.1 % change
  Mem (MB) Time (sec) Mem (MB) Time (sec) Memory Time
50k rows * 5 cols
xls 540 126 117 7.5 -78% -94%
xlsx 743 152 146 8.2 -80% -95%
pdf 485 162 40 37.0 -92% -77%
preview 480 122 32 4.9 -93% -96%
100k rows * 5 cols
xls - - - - - -
xlsx 2416 741 206 16 -99% -98%
pdf 963 573 80 73 -92% -87%
preview 956 447 65 9 -93% -98%
50k rows * 20 cols
xls 3016 637 476 28 -84% -96%
xlsx 6073 2721 595 35 -90% -99%
pdf   >3000 163 128   HUGE
preview 2848 610 130 17 -95% -97%
100k rows * 20 cols
xls - - - - - -
xlsx   >3000 997 74   HUGE
pdf   >3000 316 264   HUGE
preview
>3000 265 32
HUGE

Notes: OK, so we got bored on some of the tests with DXperience v2010.2. We basically abandoned the test if it took more than 50 minutes (3000 seconds). To be honest, we have better things to do. So where it says HUGE, assume it means the percentage change was between –99% and –99.9999%.

Together with these performance and memory improvements, we’ve made some small UI changes:

  • We’ve added the ability to show progress for export/print/preview:

    ExportProgress
  • It also has the ability to provide a Cancel button to halt the process:

    ExportProgressCancel
  • For the new Instant Feedback UI, we’ve added a marquee progress bar for when the grid is loading data from the server:

    LoadingMarquee

We’ve also made some changes to help with exporting to Excel. Selected editors (CheckEdit, ImageComboBoxEdit, ColorEdit) will now export a textual representation rather than an image, as before. So for example, in v2010.2 and earlier, if you exported the contents of a CheckEdit column, you would get this:

CurrentExportCheckbox

Where the cells are images. Actually that’s not quite right, there was an issue where, if you deleted the column, the images would remain (wacky but true):

CurrentExportCheckboxError 

Anyway, forget all that because from v2011.1 onwards, you will get this:

NewExportCheckbox

Stay tuned for more WinForms news in DXperience v2011.1.

Published Apr 05 2011, 10:55 AM by
Filed under: , ,
Bookmark and Share

Comments

Eric McSweeney_1

Nice work!  Any chance of getting "Unchecked" and "Checked" changed to "True" and "False"?

April 5, 2011 3:22 PM

Christopher D. Todd

Would be nice to specify whether to use actual value or textual representation (on a per column basis). What drives me nuts is I would rather see raw values than what is shown on report most times. We have engineers who like to export to excel and apply their calculations and formulas against the raw data.

Chris.

April 5, 2011 5:06 PM

Robert Fuchs

So why Unchecked/Checked instead of True/False?

Can it be changed?

Can it be localized?

April 5, 2011 8:04 PM

Crono

Wow, that is fantastic! :D

@Robert:

I'm pretty sure these corresponds to the checkedit's DisplayValueChecked/Unchecked/Grayed values.

April 5, 2011 8:32 PM

CESAR F. QüEB

@Crono,

The suggestion from Robert is very important. Maybe the value must be configurable, i.e: Use logical value (true/false/) or use bits (1/0).

April 5, 2011 9:51 PM

Steven Rasmussen

All i've got to say is 'Wow'!  Either the exporting engine was terrible before, or you guys are just awesome!  I think it's probably a little of both :) maybe more of the pure awesomeness though.  Keep up the great work!  I'm getting really excited for this upcoming release.

April 6, 2011 12:03 AM

James Zhong

Good performance improvements!

April 6, 2011 3:02 AM

Onur Tekin

Can we expect the same performans improvement from PivotGrid export ?

April 6, 2011 9:40 AM

Guido Volkmann

Please!!!!! Let that the gridvalues on booleans localizeable or changeable!

April 6, 2011 10:45 AM

Sigol

That's massive. Great work. Will have a huge impact on our product.

April 6, 2011 11:22 AM

Thomas Petersen

Funny this, i tried to the same tests but weather i did it on a PC with 6 or 8 GB memory available the App crashed,

38000 rows*28 Columns. But not with data in all of them.

Only 8 columns with data

April 6, 2011 11:36 AM

Jim Swarr

Most excellent - I look forward to the performance improvement.

I am also not going to quibble about the change to the boolean output to Excel as checked/unchecked. A simple macro will make short work of that little problem - getting rid of the image is a big deal to me - that little feature has always been a pain in my *ss.

April 6, 2011 11:38 AM

Bert Stomphorst

Really nice work!

Does the same performance improvement affect the pivotgrid?

April 6, 2011 11:41 AM

Ron Birk

Will this affect the webforms export in any way too?

April 6, 2011 11:47 AM

Dennis Sourvanos

Awesome work... Lokking forward oto the release.

Please do reconsider Checked/Unchecked!!! Definetely I preferred the image to be honest.

April 7, 2011 3:06 AM

Rob Simmons

Very nice all around.  To get in my 2 cents about checked/unchecked, it would be nice to have configurable text values for them (by column) as most of our end users would likely prefer yes/no, and obviously there are other options that may make more sense to the end user based on what the column represents (any X/NotX combo).

April 7, 2011 1:11 PM

Mike Falcon (DevExpress)

For checked/unchecked - you can use our localization engine or RepositoryItemCheckEdit.DisplayValue(Checked/Unchecked) properties.

April 7, 2011 1:35 PM

Chris Danielson

Any ideas of when 2011 will be released ? I am really tired explaining customers why they wait hours to load their reports to see "Out of memory" exception.

April 28, 2011 1:30 PM

Bryce Avallone

Does this change improve just the Grid or all of the component excel exports (Tree, VGrid, Pivot, etc)

June 1, 2011 3:13 PM

LUCIANO REZENDE

Has this implementation applicable to .asp .net

May 22, 2012 7:20 PM

About Julian Bucknall (DevExpress)

Julian is the Chief Technology Officer at Developer Express. You can reach him directly at julianb@devexpress.com. You can also follow him on Twitter with the ID JMBucknall.
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2014 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners