Print Page | Close Window

Extreme Performanceproblems

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=8977
Printed Date: 17 July 2025 at 10:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Extreme Performanceproblems
Posted By: Baldur
Subject: Extreme Performanceproblems
Date Posted: 01 December 2007 at 1:24pm

I'm using ReportControl 11.2.1, but also happens in 11.2.0.

I have a few reportcontrols in different windows and with different modes.
The most controls ar used normal with filled records.
 
But two reports i must use the customdraw-feature like in your virtual-list-example, because some default-layouts becomes heavy.
 
If i fill the report with 1500 rows and a 8 columns, 1 with icon and 3 hidden the performance degrease very heavy:
 
- simply go down or up with cursorkeys need ca. 0,5 Seconds per row !!
- scrolling seams nearly impossible
- move with scollbars also works very very slow
 
I've tried to make a simple new projekt with customdraw but there is all working fine and fast.
 
I can't find any reason for the different projects and i need a solution, because i must populate some databaseoutput with 1 to thousends of records.
If i fill the entire report i need too much time (and core) before the user see anything.
 
Please help, to find any solution that customdraw works fine as in your virtual-list-example.



Replies:
Posted By: Bernie
Date Posted: 02 December 2007 at 7:59pm
Did you run the poroject in the VIRTUAL MODE?


Posted By: Baldur
Date Posted: 03 December 2007 at 10:13am
Yes, that's the Problem.
In non-virtualmode, the Report is fast as i want, but i need ca. 10 seconds to fill many data and i need much core.
The scrolling und moving is than fast.
 
In virtualmode, the first userresponse is very fast (i save time for loading the grid), but the scrolling and moving is heavy.
 
This is the init at form_load:
 
    With repReport ' the grid
        With .PaintManager
            .ColumnStyle = xtpColumnFlat
            .NoItemsText = ""
            .HideSelection = False
            .HotTracking = False
            .InvertColumnOnClick = False
            .VerticalGridStyle = xtpGridSolid
            .HorizontalGridStyle = xtpGridSolid
            .TextFont.Name = FontName
            .TextFont.Size = FontSize
            .CaptionFont.Name = FontName
            .CaptionFont.Size = FontSize
            .ShadeSortColumn = False
            With .HeaderHeightFormula
                .Constant = 0
            End With
            .SelectedRowBackColor = .HighlightBackColor
            .SelectedRowForeColor = .HighlightForeColor
            .FreezeColsDividerStyle = xtpReportFreezeColsDividerThin
            .FreezeColsDividerColor = vbBlack
        End With
        .ToolTipContext.Style = xtpToolTipBalloon
        .AllowEdit = False
        .HeaderRowsAllowEdit = False
        .ShowHeaderRows = True
        .FocusSubItems = True
        .MultipleSelection = False
        Set .Icons = gMain.cmdBars.Icons            ' shared Icons
        .AutoColumnSizing = False
        .AllowColumnResize = True
        .SetCustomDraw xtpCustomBeforeDrawRow Or xtpCustomMeasureRow
        .PaintManager.FixedRowHeight = False
    End With
If i later get the recordset from the database i do the following
 
        .SortOrder.DeleteAll                        ' no Sort
        .Columns.DeleteAll                          ' no columns
        .SetVirtualMode Recordset.RecordCount
and build all columns from the recordset.fields-collection.
 
finally i call "populate".
 
I use a fixed rowheight of 17.
The screen contains only 17 rows, my recordset contains 27 records.
 
The MeasureRow is called twice for each row and for this 17 rows, the report needs 0.8 seconds from 1 row to the next row !
 
following events occur:
 
5 events BeforeDrawRow, row 1 columns 1 to 5
1 event MeasureRow, row 1
5 events BeforeDrawRow, row 1 columns 1 to 5
1 event MeasureRow, row 1
5 events BeforeDrawRow, row 1 columns 1 to 5
 
this are 17 events, even if it where enough with 6 events.
 
so, for 17 rows i get 289 events !
 
Each cursormovement or itemclick will redraw the whole visible grid.
May be, that this is the same at non-virtualmode, but this can not be the reason for this performance.
 
In the demo-virtual-list-project its work very fast !
 
How can i analyse the problem ?
Any ideas ?


Posted By: Baldur
Date Posted: 20 December 2007 at 2:38pm
The performanceproblem results in the ADO-Activex !
If you have an Activex-Exe, ADO works in an other manner as expected.
Some objects work very slow, specially the "AbsolutePosition"-Property.
 
Somtimes you can access this property 100,000 times in 1 second, somtimes only 500 times.
I can't find any reason for this difference.
 
Access to Field-Object's works only a little bit faster.
 
I fill now the reportcontrol complete, tell the records by myself (no access to AbsolutePosition) and use rs.Collect(n) instead of rs(n).value.
 
The Report fills 10 Columns with 10,000 Records now in 3,5 Seconds.
 
With access of AbsolutePosition and Field-Object, i need 70 to 80 seconds !



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