Print Page | Close Window

How to impove the performance in C#.NET?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=20147
Printed Date: 23 November 2024 at 2:24pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to impove the performance in C#.NET?
Posted By: daguda
Subject: How to impove the performance in C#.NET?
Date 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!





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net