From 18b5142b29d7fe828f17dd816c55b9fb5925ea85 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 16 Apr 2014 21:02:28 +0000 Subject: [PATCH] Performance optimization on nodeGetCell() in R-Tree. FossilOrigin-Name: 5d20ff9ec837ad35bc44d6c25d13764b350e81dd --- ext/rtree/rtree.c | 11 ++++++++--- manifest | 13 ++++++------- manifest.uuid | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 9c62576612..6bf1db11c4 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -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; iinDim*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