-C Rearrange\sthe\scode\sinside\ssqlite3RunParser()\sroutine\sso\sthat\ssqlite3Parser()\nis\sonly\scalled\sfrom\sa\ssingle\splace.\s\sThis\sallows\ssqlite3Parser()\sto\sbe\nin-lined,\swhich\sresults\sin\sa\s0.25%\soverall\sperformance\sgain.
-D 2016-08-10T14:40:00.773
+C Tweaks\sto\spcache1TruncateUnsafe()\sto\smake\sit\sslightly\ssmaller\sand\sfaster\sand\neasier\sto\stest.
+D 2016-08-10T15:02:49.189
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
F src/parse.y 99b676e6fc2f4e331ab93e76b3987cffdbd28efa
F src/pcache.c 5583c8ade4b05075a60ba953ef471d1c1a9c05df
F src/pcache.h 2cedcd8407eb23017d92790b112186886e179490
-F src/pcache1.c dc8a6052e5136d6b5e6afe51f37485145646f5ab
+F src/pcache1.c 4bb7a6a5300c67d0b033d25adb509c120c03e812
F src/pragma.c c8b499756658cb8b82cfdbb5845c22cf11f297aa
F src/pragma.h 64c78a648751b9f4f297276c4eb7507b14b4628c
F src/prepare.c 22df6171aec1d86904ed2ad30c2348a5748aa04e
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 8c2701e70ab2553d7a586ff5fe7afa02d8c63199
-R d55f09ced5a54b7cb7985c5709f82b8d
+P 25d1d02b3ea126ade22b2a72649ae55509aa1777
+R 828a3811914080064b74ae479ed3b60e
U drh
-Z f780132273cb4e2f41bbf55d6f67764f
+Z 4a1a54abd34521e8d97a121a8de840a3
assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
assert( pCache->iMaxKey >= iLimit );
assert( pCache->nHash > 0 );
- if( pCache->iMaxKey - iLimit < pCache->nHash/2 ){
+ if( pCache->iMaxKey - iLimit < pCache->nHash ){
/* If we are just shaving the last few pages off the end of the
** cache, then there is no point in scanning the entire hash table.
** Only scan those hash slots that might contain pages that need to
** be removed. */
- iStop = iLimit % pCache->nHash;
- h = pCache->iMaxKey % pCache->nHash;
+ h = iLimit % pCache->nHash;
+ iStop = pCache->iMaxKey % pCache->nHash;
TESTONLY( nPage = -10; ) /* Disable the pCache->nPage validity check */
}else{
/* This is the general case where many pages are being removed.
** It is necessary to scan the entire hash table */
- iStop = 0;
- h = pCache->nHash - 1;
+ h = pCache->nHash/2;
+ iStop = h - 1;
}
for(;;){
PgHdr1 **pp;
}
}
if( h==iStop ) break;
- h = h ? h-1 : pCache->nHash - 1;
+ h = (h+1) % pCache->nHash;
}
assert( nPage<0 || pCache->nPage==(unsigned)nPage );
}