Unacceptable Performance for Data Export (.ten, Excel, etc.)
Posted: Tue Aug 09, 2005 10:01 pm
TeeChart.NET is extremely slow at exporting moderate amounts of data (40k data points). I am using TeeChart.NET v1, but I have tried this with v2 Evaluation as well and it was still extremely slow.
1. Simply open up the demo app (for v1 or v2) and get to a chart editor.
2. Add a ColorGrid series or Bubble series.
3. Set the data source to "random" and set # of points to 200 for ColorGrid (which for ColorGrid means 200 * 200 = 40,000 points) or 40,000 for Bubble.
4. Notice that ColorGrid renders fast enough, but Bubble renders a little slow compared to the ActiveX control (try zooming with animation or just resize the form).
5. Now, attempt to export the data by saving to a ".ten" file with the data included or by using copy to clipboard in Excel format (and probably any other format).
6. Notice that it takes 3-5 minutes or more, or even crashes (see crash dump below).
Our original application was written using ActiveX v5 using the Bubble series type and has no trouble with large amounts of data. I am experimenting with using the ColorGrid series type because it makes sense for our data (we are currently plotting many square bubbles with 0.5 radius). I find the performance of the .NET control to be disappointing in general, and for data export it is unacceptable.
Are you using a ton of string concatenation to export the data? Your data export code must have some sort of exponential algorithm because it is unbelievably slow. I'm certain that with some effort, you can make a dramatic improvement in this area.
Please look into this issue.
Thanks,
Walt Dell
Here is the crash dump I got trying to export a 40,000 data point ColorGrid series using TeeChart.NET v2:
---------------------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServices.ExternalException: The requested clipboard operation failed.
at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy)
at Steema.TeeChart.Export.DataExportFormat.CopyToClipboard()
at Steema.TeeChart.Editors.Export.ExportEditor.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 2.0.1992.14012
Win32 Version: 2.0.1992.14012
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
AxInterop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/Interop.SHDocVw.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
TeeChart
Assembly Version: 2.0.1992.14011
Win32 Version: 2.0.1992.14011
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/TeeChart.DLL
----------------------------------------
System.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
1. Simply open up the demo app (for v1 or v2) and get to a chart editor.
2. Add a ColorGrid series or Bubble series.
3. Set the data source to "random" and set # of points to 200 for ColorGrid (which for ColorGrid means 200 * 200 = 40,000 points) or 40,000 for Bubble.
4. Notice that ColorGrid renders fast enough, but Bubble renders a little slow compared to the ActiveX control (try zooming with animation or just resize the form).
5. Now, attempt to export the data by saving to a ".ten" file with the data included or by using copy to clipboard in Excel format (and probably any other format).
6. Notice that it takes 3-5 minutes or more, or even crashes (see crash dump below).
Our original application was written using ActiveX v5 using the Bubble series type and has no trouble with large amounts of data. I am experimenting with using the ColorGrid series type because it makes sense for our data (we are currently plotting many square bubbles with 0.5 radius). I find the performance of the .NET control to be disappointing in general, and for data export it is unacceptable.
Are you using a ton of string concatenation to export the data? Your data export code must have some sort of exponential algorithm because it is unbelievably slow. I'm certain that with some effort, you can make a dramatic improvement in this area.
Please look into this issue.
Thanks,
Walt Dell
Here is the crash dump I got trying to export a 40,000 data point ColorGrid series using TeeChart.NET v2:
---------------------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Runtime.InteropServices.ExternalException: The requested clipboard operation failed.
at System.Windows.Forms.Clipboard.SetDataObject(Object data, Boolean copy)
at Steema.TeeChart.Export.DataExportFormat.CopyToClipboard()
at Steema.TeeChart.Editors.Export.ExportEditor.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 2.0.1992.14012
Win32 Version: 2.0.1992.14012
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
AxInterop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/Interop.SHDocVw.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
TeeChart
Assembly Version: 2.0.1992.14011
Win32 Version: 2.0.1992.14011
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2%20Evaluation/Examples/DemoProject/bin/ExecutableDemo/TeeChart.DLL
----------------------------------------
System.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.