1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Performance optimization in accessPayload().

FossilOrigin-Name: ebb1fd98d4e448aa6d8f1e5be7ddc5bedb3db95b
This commit is contained in:
drh
2017-01-27 01:13:49 +00:00
parent 42e28f12a3
commit cdf360a0d5
3 changed files with 17 additions and 17 deletions

View File

@@ -4525,16 +4525,16 @@ static int accessPayload(
}
memset(pCur->aOverflow, 0, nOvfl*sizeof(Pgno));
pCur->curFlags |= BTCF_ValidOvfl;
}
/* If the overflow page-list cache has been allocated and the
** entry for the first required overflow page is valid, skip
** directly to it.
*/
if( pCur->aOverflow[offset/ovflSize] ){
iIdx = (offset/ovflSize);
nextPage = pCur->aOverflow[iIdx];
offset = (offset%ovflSize);
}else{
/* If the overflow page-list cache has been allocated and the
** entry for the first required overflow page is valid, skip
** directly to it.
*/
if( pCur->aOverflow[offset/ovflSize] ){
iIdx = (offset/ovflSize);
nextPage = pCur->aOverflow[iIdx];
offset = (offset%ovflSize);
}
}
assert( rc==SQLITE_OK && amt>0 );