How to impove the performance in C#.NET? |
Post Reply |
Author | |
daguda
Newbie Joined: 04 September 2012 Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 22 September 2012 at 4:10am |
I just found that Report Control in C#.NET takes 50 times slower than it in VB6, take a look at these two demos:
(1)Open C#.NET\ReportSample\ReportSample.sln project, then edit this code: for(int k=0 ; k<1000;k++) AddRows(); It takes about 58.3 seconds to add 18013 rows. (2)Open VB\ReportSample\ReportSample.vbp project, add the following lines: (a) cstrCJlink = "https://forum.codejock.com" Dim j As Long ' < ---------- add For j = 1 To 1000 ' < ---------- add 'Start Adding Records with the AddRecord helper subroutine 'Look at the AddRecord subroutine for a more detailed explanation (b) Next '<----------- add 'Vertical grid lines will be drawn as small dots 'wndReportControl.PaintManager.VerticalGridStyle = xtpGridSolid It takes only 1.1 seconds to add 18013 rows. How to impove the performance in C#.NET? Any advice would be greatly appreciated!! Thank you! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |