1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

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
This commit is contained in:
drh
2017-09-01 12:18:41 +00:00
parent 38688b0b1d
commit f0dae6d0a2
4 changed files with 11 additions and 12 deletions

View File

@@ -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 );