Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Alastair Watts
|
Oct 3, 2011 - 3:06 PM
|
I’m looking to improve grid building performance, or rather grid shrinking performance. I have been using RowTruncate() to reduce the row count and this works, but RowTruncate() can take a few seconds on large grids. I thought I might be able to use the following instead ... but it crashes!
LONG nRowsNeeded = CalculateRowsNeeded();
if(nRowsNeeded > m_nRowsCurrent)
{
RowCountSet(m_nRowsCurrent);
RowAdd(nRowsNeeded - nRowsCurrent, false);
m_nRowsCurrent = nRowsNeeded;
}
else if(nRowsNeeded < m_nRowsCurrent)
{
RowCountSet(nRowsNeeded, false);
}
...
|
|
Technical Support
|
Oct 5, 2011 - 10:58 AM
|
The RowAdd() , RowInsert() , RowTruncate() and RowRemove() APIs are for in-memory grids. The RowCountSet() API is for virtually cached grid controls. If you are using an in-memory grid, you should not use APIs of virtually cached grids and vice versa. In-memory grids are not good for big row counts. Virtually cached grids demonstrate performance which does not depend on the row count. The AdoRecordsetView sample application demonstrates virtually cached grid control which loads grid rows from a database. Here is the test project demonstrating non-database grid with virtual caching:
http://www.prof-uis.com/download/forums/CacheableGrid2.zip
|
|