J
Jinshui
I finished a Vb.NET windows apllication recently and
deployed to users. While it runs <9 seconds to show the
graphs in my machine(Win2000 pro with .NET Framework 1.1 +
VS.NET 1.0 IDE), it took 200 seconds in clients' machines.
To draw the graphs, I put the MS Chart(AxVtChart Lib.,
which was upgraded from VB6)into the forms and wrote code
to set data points, legends, title, plot, pen...
The same function/code written in VB 6 run very fast, <1
second).
I knew that .NET would take more time to run un-managed
codes like Active X Controls, however I don't think a big
difference(200 times) between the managed and un-managed
in a small/intermediate application.
My question is why the application performance was
degraded so much in clients' machines, and how to fix it.
Thank you.
The code snapets are as following:
with VtChart1(i) 'i=1 to 5: total 5 graphs
.chartType= VtChartLib.VtChChartType. & _
VtChChartType2dXY 'Set Charttype
.ColumnCount = 2 * NumSets 'Set data series number
.RowCount = MaxPoint =50 'set points number
.Plot.Axis(VtChartLib.VtChAxisId.VtChAxisIdX, & _
1).ValueScale.Maximum = MaxX
For J = 1 To NumDataSet ' set data points values
.Column = 2 * I - 1
.Row = J
.Data = CStr(XDataXL(I, J))
.Column = 2 * I
.Row = J
.Data = CStr(YDataXL(I, J))
Next J ' loop 50 times
.ShowLegend = True
.Legend.VtFont.Size = 7
.Legend.Location.LocationType = & _
VtChartLib.VtChLocationType.VtChLocationTypeTop
With .Plot.SeriesCollection.Item(I).DataPoints.Item & _
(-1).Marker
.Style = VtChartLib.VtMarkerStyle.VtMarkerStyleNull
End With
.Plot.SeriesCollection.Item(J).SeriesMarker.Auto = False
' ......
End with
deployed to users. While it runs <9 seconds to show the
graphs in my machine(Win2000 pro with .NET Framework 1.1 +
VS.NET 1.0 IDE), it took 200 seconds in clients' machines.
To draw the graphs, I put the MS Chart(AxVtChart Lib.,
which was upgraded from VB6)into the forms and wrote code
to set data points, legends, title, plot, pen...
The same function/code written in VB 6 run very fast, <1
second).
I knew that .NET would take more time to run un-managed
codes like Active X Controls, however I don't think a big
difference(200 times) between the managed and un-managed
in a small/intermediate application.
My question is why the application performance was
degraded so much in clients' machines, and how to fix it.
Thank you.
The code snapets are as following:
with VtChart1(i) 'i=1 to 5: total 5 graphs
.chartType= VtChartLib.VtChChartType. & _
VtChChartType2dXY 'Set Charttype
.ColumnCount = 2 * NumSets 'Set data series number
.RowCount = MaxPoint =50 'set points number
.Plot.Axis(VtChartLib.VtChAxisId.VtChAxisIdX, & _
1).ValueScale.Maximum = MaxX
For J = 1 To NumDataSet ' set data points values
.Column = 2 * I - 1
.Row = J
.Data = CStr(XDataXL(I, J))
.Column = 2 * I
.Row = J
.Data = CStr(YDataXL(I, J))
Next J ' loop 50 times
.ShowLegend = True
.Legend.VtFont.Size = 7
.Legend.Location.LocationType = & _
VtChartLib.VtChLocationType.VtChLocationTypeTop
With .Plot.SeriesCollection.Item(I).DataPoints.Item & _
(-1).Marker
.Style = VtChartLib.VtMarkerStyle.VtMarkerStyleNull
End With
.Plot.SeriesCollection.Item(J).SeriesMarker.Auto = False
' ......
End with