Using CXTPReportRows::ReserveSize |
Post Reply |
Author | |
markr
Senior Member Joined: 01 August 2004 Status: Offline Points: 443 |
Post Options
Thanks(0)
Posted: 29 September 2007 at 2:58pm |
Hello,
I see that a new optimization method, CXTPReportRows::ReserveSize, has been added to the report control for the 11.2 release. Could someone provide "best practices" for how this should be used? In our case, we add records to the control on the fly, then call Populate(). So my assumption is that I should call ReserveSize(N) right before I call Populate() - where N is the number of records added in previous steps. This is correct usage, or is there a better way? P.S. - I am not using virtual mode. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Hi,
If you use a significant number of records with your Report control, you can simply enable new optimization features:
Some methods like CXTPReportRows::ReserveSize, related to recently added optimization bunch, are public and you can use them if feel helpful. CXTPReportRows::ReserveSize works similar to CArray::SetSize -- it prevents adding elements to your array with frequently memory reallocation (which then causes memory fragmentation). -- WBR, Serge |
|
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 |