/ Check-in [c4e7e175]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove an obsolete optimization in pcache that due to more recent changes was recently making the code a little slower.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: c4e7e175eecfd79015f4fae99618dfce6baf97c21bf3c909ea535d4e12dcaaad
User & Date: drh 2017-09-01 12:57:33
Context
2017-09-01
14:50
Add the new sqlite3PagerUnrefPageOne() pager method to deal with the special case of unreferencing page1. check-in: b2e2100c user: drh tags: trunk
12:57
Remove an obsolete optimization in pcache that due to more recent changes was recently making the code a little slower. check-in: c4e7e175 user: drh tags: trunk
12:18
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. check-in: 919863b1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.c.

   506    506   */
   507    507   void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
   508    508     assert( p->nRef>0 );
   509    509     p->pCache->nRefSum--;
   510    510     if( (--p->nRef)==0 ){
   511    511       if( p->flags&PGHDR_CLEAN ){
   512    512         pcacheUnpin(p);
   513         -    }else if( p->pDirtyPrev!=0 ){ /*OPTIMIZATION-IF-FALSE*/
   514         -      /* Move the page to the head of the dirty list. If p->pDirtyPrev==0,
   515         -      ** then page p is already at the head of the dirty list and the
   516         -      ** following call would be a no-op. Hence the OPTIMIZATION-IF-FALSE
   517         -      ** tag above.  */
          513  +    }else{
   518    514         pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
   519    515       }
   520    516     }
   521    517   }
   522    518   
   523    519   /*
   524    520   ** Increase the reference count of a supplied page by 1.