aboutsummaryrefslogtreecommitdiff
path: root/src/pcache.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-09-01 12:18:41 +0000
committerdrh <drh@noemail.net>2017-09-01 12:18:41 +0000
commitf0dae6d0a276566e384d38244b58ceda3ae58907 (patch)
treec7b3ffcd067b7f0fd3403df41252fd9cd1687f4f /src/pcache.c
parent38688b0b1da8881c1c7dc31659eb09bba92c2b76 (diff)
downloadsqlite-f0dae6d0a276566e384d38244b58ceda3ae58907.tar.gz
sqlite-f0dae6d0a276566e384d38244b58ceda3ae58907.zip
Small size and performance improvement in pcacheManageDirtyList() by not
zeroing the PgHdr.pDirtyNext and PgHdr.pDirtyPrev pointers for PgHdr objects that are not on the dirty list. FossilOrigin-Name: 919863b14859d958d6c078097faae02070c7bd082e2814cf3f84bd84921e4419
Diffstat (limited to 'src/pcache.c')
-rw-r--r--src/pcache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pcache.c b/src/pcache.c
index dc7d00f30..9687ac770 100644
--- a/src/pcache.c
+++ b/src/pcache.c
@@ -191,12 +191,9 @@ static void pcacheManageDirtyList(PgHdr *pPage, u8 addRemove){
p->eCreate = 2;
}
}
- pPage->pDirtyNext = 0;
- pPage->pDirtyPrev = 0;
}
if( addRemove & PCACHE_DIRTYLIST_ADD ){
- assert( pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage );
-
+ pPage->pDirtyPrev = 0;
pPage->pDirtyNext = p->pDirty;
if( pPage->pDirtyNext ){
assert( pPage->pDirtyNext->pDirtyPrev==0 );