-C Experimental\spatch\srestore\sthe\sslight\sbias\sin\sbtree-balancing\simmediately\nafter\sthe\schange\sto\sreduces\sthe\samount\sof\smemcpy()\swork\sdone\sby\sbalancing.
-D 2016-07-14T20:19:24.187
+C Temporarily\sadd\sextra\ssqlite3_log()\scalls\sto\sthis\sversion\sto\shelp\swith\sdebugging\sa\sperformance\sproblem.
+D 2016-07-16T11:47:45.840
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/vdbesort.c 975aeffa99acb0991b2f288d30294756bff41438
F src/vdbetrace.c 7e4222955e07dd707a2f360c0eb73452be1cb010
F src/vtab.c cb0c194303fea276b48d7d4b6d970b5a96bde8de
-F src/wal.c 10e7de7ce90865a68153f001a61f1d985cd17983
+F src/wal.c e77da6efffa373cd20d248be9e86c54c634bc4fe
F src/wal.h df01efe09c5cb8c8e391ff1715cca294f89668a4
F src/walker.c c253b95b4ee44b21c406e2a1052636c31ea27804
F src/where.c 4ce8c4826b7f86d080f0ed4e7a9045bb5014be77
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P face33bea1ba3a6d57780655fa827226b4d2baa9
-R 554fefe0a719f26931bb9cdfcdd471c4
-T *branch * btree-balance-bias
-T *sym-btree-balance-bias *
-T -sym-trunk *
-U drh
-Z 0e91eabd67698f71b8b9d1b306b232d2
+P 46bd9533c0b4656e9fb10eb41c9369ba8a113746
+R bce5e212270955da4d92cb60e4c49b45
+T *branch * debug
+T *sym-debug *
+T -sym-btree-balance-bias *
+U dan
+Z 9b01bf4c5271e3c2cb45a6e077ca93cf
i64 nSize; /* Current size of database file */
u32 nBackfill = pInfo->nBackfill;
+ /* ELATDPP: Extra logging added to debug performance problem */
+ sqlite3_log(SQLITE_NOTICE,
+ "wal: checkpoint salt1=%08x salt2=%08x "
+ "nBackfill=%d mxSafeFrame=%d mxFrame=%d",
+ pWal->hdr.aSalt[0], pWal->hdr.aSalt[1],
+ (int)nBackfill, (int)mxSafeFrame, (int)pWal->hdr.mxFrame
+ );
+
/* Sync the WAL to disk */
if( sync_flags ){
rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
iOffset += szFrame;
}
+ /* ELATDPP: Extra logging added to debug performance problem */
+ sqlite3_log(SQLITE_NOTICE, "wal: write nFrame=%d iFrame=%d",
+ iFrame - pWal->hdr.mxFrame,
+ pWal->hdr.mxFrame+1
+ );
+
/* If this is the end of a transaction, then we might need to pad
** the transaction and/or sync the WAL file.
**
int isChanged = 0; /* True if a new wal-index header is loaded */
int eMode2 = eMode; /* Mode to pass to walCheckpoint() */
+ /* ELATDPP: Extra logging added to debug performance problem */
+ sqlite3_int64 t1, t2;
+ sqlite3OsCurrentTimeInt64(pWal->pVfs, &t1);
+
assert( pWal->ckptLock==0 );
assert( pWal->writeLock==0 );
sqlite3WalEndWriteTransaction(pWal);
walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);
pWal->ckptLock = 0;
+
+ /* ELATDPP: Extra logging added to debug performance problem */
+ sqlite3OsCurrentTimeInt64(pWal->pVfs, &t2);
+ sqlite3_log(SQLITE_NOTICE, "wal: checkpoint rc=%d ms=%lld", rc, t2-t1);
+
WALTRACE(("WAL%p: checkpoint %s\n", pWal, rc ? "failed" : "ok"));
return (rc==SQLITE_OK && eMode!=eMode2 ? SQLITE_BUSY : rc);
}