https://sourceforge.net/tracker/?func=detail&aid=2913975&group_id=176962&atid=955896 [ implement virtual mode for high volume table for enhance scalability ]

- fixed problem related to new row reported from on field testing
This commit is contained in:
Heng Sin Low 2009-12-18 00:31:31 +00:00
parent 284f80f194
commit 9d2097d2eb
1 changed files with 27 additions and 1 deletions

View File

@ -2376,6 +2376,14 @@ private Object[] getDataAtRow(int row)
if (m_virtual)
{
m_buffer.add(m_newRow, rowData);
if (m_cacheStart == -1)
{
m_cacheStart = m_cacheEnd = m_newRow;
}
else if (m_cacheEnd < m_newRow)
{
m_cacheEnd = m_newRow;
}
}
else
{
@ -2576,9 +2584,18 @@ private Object[] getDataAtRow(int row)
else
{
if (m_cacheStart == row)
m_cacheStart++;
{
if (m_cacheStart < m_cacheEnd)
m_cacheStart++;
else
m_cacheStart = m_cacheEnd = -1;
}
else
{
m_cacheEnd--;
if (m_cacheStart > m_cacheEnd)
m_cacheStart = m_cacheEnd;
}
}
// inform
@ -2616,6 +2633,15 @@ private Object[] getDataAtRow(int row)
m_rowCount--;
// Delete row in Sort
m_sort.remove(m_newRow); // pintint to the last column, so no adjustment
if (m_virtual)
{
if (m_cacheEnd == m_newRow)
{
m_cacheEnd--;
if (m_cacheStart > m_cacheEnd)
m_cacheStart = m_cacheEnd;
}
}
//
m_changed = false;
m_rowData = null;