1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Performance optimization on nodeGetCell() in R-Tree.

FossilOrigin-Name: 5d20ff9ec837ad35bc44d6c25d13764b350e81dd
This commit is contained in:
drh
2014-04-16 21:02:28 +00:00
parent 22596b6b3c
commit 18b5142b29
3 changed files with 15 additions and 11 deletions

View File

@ -729,10 +729,15 @@ static void nodeGetCell(
int iCell, /* Index of the cell within the node */
RtreeCell *pCell /* OUT: Write the cell contents here */
){
int ii;
u8 *pData;
u8 *pEnd;
RtreeCoord *pCoord;
pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
for(ii=0; ii<pRtree->nDim*2; ii++){
nodeGetCoord(pRtree, pNode, iCell, ii, &pCell->aCoord[ii]);
pData = pNode->zData + (12 + pRtree->nBytesPerCell*iCell);
pEnd = pData + pRtree->nDim*8;
pCoord = pCell->aCoord;
for(; pData<pEnd; pData+=4, pCoord++){
readCoord(pData, pCoord);
}
}