Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Extreme Performanceproblems
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Extreme Performanceproblems

 Post Reply Post Reply
Author
Message
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Topic: Extreme Performanceproblems
    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.
Back to Top
Bernie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 July 2007
Location: Taiwan
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bernie Quote  Post ReplyReply Direct Link To This Post Posted: 02 December 2007 at 7:59pm
Did you run the poroject in the VIRTUAL MODE?
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post 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 !
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.