-C Combine\sthe\spcacheAddToDirtyList()\sand\spcacheRemoveFromDirtyList()\sroutines\ninto\sa\ssingle\spcacheManageDirtyList()\sroutine.\s\sThe\sresulting\sbinary\scode\sis\nslightly\sfaster\sand\sa\sfew\sbytes\ssmaller.
-D 2014-08-22T20:35:29.948
+C Performance\senhancements\sin\sthe\sb-tree\smutex\slogic.
+D 2014-08-22T21:58:10.354
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/auth.c 523da7fb4979469955d822ff9298352d6b31de34
F src/backup.c a31809c65623cc41849b94d368917f8bb66e6a7e
F src/bitvec.c 19a4ba637bd85f8f63fc8c9bae5ade9fb05ec1cb
-F src/btmutex.c 976f45a12e37293e32cae0281b15a21d48a8aaa7
+F src/btmutex.c ec9d3f1295dafeb278c3830211cc5584132468f4
F src/btree.c 4195fed5741b4dbcc9831b623aec487258f3e62d
F src/btree.h 4245a349bfe09611d7ff887dbc3a80cee8b7955a
F src/btreeInt.h cf180d86b2e9e418f638d65baa425c4c69c0e0e3
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P a929be551924144c9bc7aab608404d59e479abb5
-R 2ac5f67b7ba10391163889b9ff4c4145
+P 6bcf1af6a48dbda5ac6f6b3b02810bdfc4730000
+R 24d5ffe2f1d9679a613707454c70f45a
U drh
-Z 6bffc4c72a94895b60e52defb6944efd
+Z 6801ae93f83fb9ed7a247305de8bd03a
-6bcf1af6a48dbda5ac6f6b3b02810bdfc4730000
\ No newline at end of file
+8914530644f938a7a98e25ea1fb0bca1f9d79101
\ No newline at end of file
** Release the BtShared mutex associated with B-Tree handle p and
** clear the p->locked boolean.
*/
-static void unlockBtreeMutex(Btree *p){
+static void SQLITE_NOINLINE unlockBtreeMutex(Btree *p){
BtShared *pBt = p->pBt;
assert( p->locked==1 );
assert( sqlite3_mutex_held(pBt->mutex) );
p->locked = 0;
}
+/* Forward reference */
+static void SQLITE_NOINLINE btreeLockCarefully(Btree *p);
+
/*
** Enter a mutex on the given BTree object.
**
** subsequent Btrees that desire a lock.
*/
void sqlite3BtreeEnter(Btree *p){
- Btree *pLater;
-
/* Some basic sanity checking on the Btree. The list of Btrees
** connected by pNext and pPrev should be in sorted order by
** Btree.pBt value. All elements of the list should belong to
if( !p->sharable ) return;
p->wantToLock++;
if( p->locked ) return;
+ btreeLockCarefully(p);
+}
+
+/* This is a helper function for sqlite3BtreeLock(). By moving
+** complex, but seldom used logic, out of sqlite3BtreeLock() and
+** into this routine, we avoid unnecessary stack pointer changes
+** and thus help the sqlite3BtreeLock() routine to run much faster
+** in the common case.
+*/
+static void SQLITE_NOINLINE btreeLockCarefully(Btree *p){
+ Btree *pLater;
/* In most cases, we should be able to acquire the lock we
** want without having to go throught the ascending lock
}
}
+
/*
** Exit the recursive mutex on a Btree.
*/