diff options
author | drh <drh@noemail.net> | 2017-01-27 01:13:49 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-01-27 01:13:49 +0000 |
commit | cdf360a0d5c3edfb49a44a7de9b39052f9562d2e (patch) | |
tree | 149948bc674beea229866463395295d5ac6019e9 /src | |
parent | 42e28f12a31d38c22163b782dde53df195d894f3 (diff) | |
download | sqlite-cdf360a0d5c3edfb49a44a7de9b39052f9562d2e.tar.gz sqlite-cdf360a0d5c3edfb49a44a7de9b39052f9562d2e.zip |
Performance optimization in accessPayload().
FossilOrigin-Name: ebb1fd98d4e448aa6d8f1e5be7ddc5bedb3db95b
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/btree.c b/src/btree.c index 2575c774c..54664043d 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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 ); |