From 8d3e15eec45466b1c89117af5f8d8a0bb6216512 Mon Sep 17 00:00:00 2001 From: drh Date: Wed, 21 Feb 2018 01:05:37 +0000 Subject: [PATCH] Small performance improvement in sqltie3WalFindFrame(). FossilOrigin-Name: 52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350 --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/wal.c | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 671a63c223..1939578313 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Remove\san\sunnecessary\smemset(). -D 2018-02-21T00:48:02.760 +C Small\sperformance\simprovement\sin\ssqltie3WalFindFrame(). +D 2018-02-21T01:05:37.077 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F Makefile.in a2d2fb8d17c39ab5ec52beb27850b903949080848236923f436156b72a958737 @@ -568,7 +568,7 @@ F src/vdbesort.c 731a09e5cb9e96b70c394c1b7cf3860fbe84acca7682e178615eb941a3a0ef2 F src/vdbetrace.c 48e11ebe040c6b41d146abed2602e3d00d621d7ebe4eb29b0a0f1617fd3c2f6c F src/vtab.c 0e4885495172e1bdf54b12cce23b395ac74ef5729031f15e1bc1e3e6b360ed1a F src/vxworks.h d2988f4e5a61a4dfe82c6524dd3d6e4f2ce3cdb9 -F src/wal.c fff06582a9611cd472fe67ba2b37da1ba052b48a41e3ee60ad55e87faf724c75 +F src/wal.c 634908f6bc2b5147c1a4218381393fc5f19cfc16bef2d9fa8029c2a7f31b73ae F src/wal.h 8de5d2d3de0956d6f6cb48c83a4012d5f227b8fe940f3a349a4b7e85ebcb492a F src/walker.c da987a20d40145c0a03c07d8fefcb2ed363becc7680d0500d9c79915591f5b1f F src/where.c 7cae47e813393d70c6d327fdf000fcb30f76b1b0b5a5b52ff6402e0c658de32c @@ -1707,7 +1707,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P e2b107141cd97bd4ab240748a9ce43fc2ec950ea74610697a4a7a3d7a6441e6b -R 59bb924e6fde113e9c73dbca193c7d8f +P e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893 +R cec4fbff2931f49a6ea05bd82279c171 U drh -Z 888a0e04ef92ada18bb625445f9ec36e +Z ba266545389d418145bdf93b79a10d36 diff --git a/manifest.uuid b/manifest.uuid index de2a013349..bd3bf9c056 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e7b7f5884a78630c6ba6a217c36247397e62f1928d4b480df929efcfc4a01893 \ No newline at end of file +52013cad0e6ce2d694f25e2984a76d438cef724f0e07c8bb9d3dce8a3caf4350 \ No newline at end of file diff --git a/src/wal.c b/src/wal.c index 99832dff3d..72bb600f5c 100644 --- a/src/wal.c +++ b/src/wal.c @@ -2882,7 +2882,7 @@ int sqlite3WalFindFrame( ** table after the current read-transaction had started. */ iMinHash = walFramePage(pWal->minFrame); - for(iHash=walFramePage(iLast); iHash>=iMinHash && iRead==0; iHash--){ + for(iHash=walFramePage(iLast); iHash>=iMinHash; iHash--){ volatile ht_slot *aHash; /* Pointer to hash table */ volatile u32 *aPgno; /* Pointer to array of page numbers */ u32 iZero; /* Frame number corresponding to aPgno[0] */ @@ -2905,6 +2905,7 @@ int sqlite3WalFindFrame( return SQLITE_CORRUPT_BKPT; } } + if( iRead ) break; } #ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT