/ Check-in [bc202e5b]
Login

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

Overview
Comment:Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bc202e5b418d5a57bfc766883c4417c94829d96e
User & Date: dan 2016-05-12 09:48:23
Context
2016-05-12
12:01
Remove an unnecessary call to sqlite3PcacheMakeClean() inside of the ROLLBACK logic. check-in: 0dc50d99 user: drh tags: trunk
09:48
Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c. check-in: bc202e5b user: dan tags: trunk
2016-05-11
20:03
Remove a redundant condition from pcache.c. Add an OPTIMIZATION-IF-TRUE comment to another condition that requires it. check-in: 3bfd2621 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.c.

   120    120         p->pDirtyTail = pPage;
   121    121         if( p->bPurgeable ){
   122    122           assert( p->eCreate==2 );
   123    123           p->eCreate = 1;
   124    124         }
   125    125       }
   126    126       p->pDirty = pPage;
   127         -    if( !p->pSynced && 0==(pPage->flags&PGHDR_NEED_SYNC) ){
          127  +
          128  +    /* If pSynced is NULL and this page has a clear NEED_SYNC flag, set
          129  +    ** pSynced to point to it. Checking the NEED_SYNC flag is an 
          130  +    ** optimization, as if pSynced points to a page with the NEED_SYNC
          131  +    ** flag set sqlite3PcacheFetchStress() searches through all newer 
          132  +    ** entries of the dirty-list for a page with NEED_SYNC clear anyway.  */
          133  +    if( !p->pSynced 
          134  +     && 0==(pPage->flags&PGHDR_NEED_SYNC)   /*OPTIMIZATION-IF-FALSE*/
          135  +    ){
   128    136         p->pSynced = pPage;
   129    137       }
   130    138     }
   131    139   }
   132    140   
   133    141   /*
   134    142   ** Wrapper around the pluggable caches xUnpin method. If the cache is