Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTPReportControl performance
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportControl performance

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


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportControl performance
    Posted: 12 June 2005 at 10:48pm
Hello,

I've been using CXTPReportControl (v9.60) for quite a while now, and I think the functionality is really solid.

I am having a problem, though with memory usage. When I add ten to twenty thousand records to the report (which has 9 colums), memory utilization really shoots up. I need the grouping capabilities of the control, so I can't use the "virtual mode" - any general tips on getting memory usage down?

Thanks,

- MR
Back to Top
markr View Drop Down
Senior Member
Senior Member


Joined: 01 August 2004
Status: Offline
Points: 443
Post Options Post Options   Thanks (0) Thanks(0)   Quote markr Quote  Post ReplyReply Direct Link To This Post Posted: 13 June 2005 at 6:23pm
Is it possible to redraw a specific row of a CXTPReportControl without calling Populate() on the entire control?

- MR

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 14 June 2005 at 4:44am

For redraw use

RedrawControl instead Populate.

call Populate only if records changed.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 16 June 2005 at 4:36am
Hi Mark,

Regarding memory usage: when you have 9 columns, you see that each corresponding record item contains its own information. I suppose that the biggest part of used memory is spent to storing some string items values. If these values are identical, or they could be calculated somehow at runtime, you can create a kind of specific RecordItem-derived class, which will not store the data (strings or anything) inside itself, but will have some static storage, or calculated at runtime in overridden GetCaption() method.

There could be something like the following:

class CDynamicRecordItemText : public CXTPReportRecordItem
{
public:
     CDynamicRecordItemText();
     virtual CString GetCaption(CXTPReportColumn* pColumn) {
           // calculate caption
           return strCalculatedCaption;
     }
     virtual CString GetGroupCaption(CXTPReportColumn* pColumn) {
           // calculate group caption
           return strCalculatedGroupCaption;
     }
};

class CCommonRecordItemText : public CXTPReportRecordItem
{
public:
     CCommonRecordItemText();
     virtual CString GetCaption(CXTPReportColumn* pColumn) {
           return ms_strText;
     }
private:
     static CString ms_strText;
};


--
WBR,
Serge
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.047 seconds.