drh
59b4bd4840
Merge all the latest enhancements from trunk. This merge include FTS5
...
and a number of notable performance enhancements.
FossilOrigin-Name: 39936b33b0668aad81aa574d4d74c92b0ddd218a
2015-06-30 16:29:59 +00:00
drh
da6d3e2117
Make use of built-in bswap32() and bswap16() functions in GCC/Clang for a
...
significant performance improvement there.
FossilOrigin-Name: 8bfcda3d10aec864d71d12a1248c37e4db6f8899
2015-06-30 15:10:29 +00:00
drh
ad265296ff
Only use <nowiki>__builtin_bswap16()</nowiki> with GCC 4.8 and later.
...
FossilOrigin-Name: ce8177e3e64d2ac4cd5d9e7757cdd5fcecd7d0ea
2015-06-30 14:01:20 +00:00
drh
329428e208
Remove the use of htonl() in the previous check-in due to linkage issues.
...
Add the get2byteAligned() macro and use it for access to the cell offsets
on btree pages for about a 1% performance gain.
FossilOrigin-Name: 79ff36b7170c9e7e7a9935c8b9d1665867771087
2015-06-30 13:28:18 +00:00
drh
5372e4d4f9
Make use of htonl() and <nowiki>__builtin_bswap32()</nowiki> for faster
...
implementations of sqlite3Get4byte() and sqlite3Put4byte().
FossilOrigin-Name: bc27ebd7f73e9fc8e00da6ec82632e439fcce812
2015-06-30 12:47:09 +00:00
drh
3169906d06
Change an unreachable branch into an assert() in sqlite3PagerAcquire()
...
and optimize sqlite3PcacheOpenSavepoint() by factoring out rarely used code
into a subroutine.
FossilOrigin-Name: b406b20ecdf0bff63c5c222fab11cb9acee86765
2015-06-30 11:07:32 +00:00
drh
d8c0ba3b02
Optimization to the sqlite3PcacheFetch() logic.
...
FossilOrigin-Name: d9a0481ce0fd9824b1566f182d68ec46ef091b1b
2015-06-30 03:57:59 +00:00
drh
50642b1deb
Put all variable declarations for sqlite3PagerWrite()
...
at the beginning of the block. Syntax only - no logic changes.
FossilOrigin-Name: a0fa6b3ba59716e53b8c035b497602050ed0ccb8
2015-06-30 03:34:13 +00:00
drh
1116bf1359
Implement sqlite3Strlen30() using strlen() from the C library.
...
FossilOrigin-Name: 8001aa52bd12f900092387fe3571463e89efd977
2015-06-30 03:18:33 +00:00
drh
597d2b6412
Change sqlite3ApiExit() so that its first argument is never NULL.
...
FossilOrigin-Name: 791b706ec6c3e80885666e48e01524f0e9a7557e
2015-06-30 03:13:47 +00:00
drh
27fb746cde
Put BtCursor objects on a singly-linked list instead of a doubly-linked list.
...
Add the BTCF_Multiple flag. Only invoke saveAllCursors() when using a cursor
that has BTCF_Multiple set.
FossilOrigin-Name: 429ccef2b36fc46e92914eb54afd5f800b1a40ff
2015-06-30 02:47:36 +00:00
drh
98ef0f6c48
Convert several 5-year-old and older NEVER() macros into assert().
...
FossilOrigin-Name: ed54c14ea8a72d69d69e0c0d7f6936f54efc04c2
2015-06-30 01:25:52 +00:00
drh
207c817365
From sqlite3BtreeInsert(), bypass the btreeMoveto() routine for table inserts
...
and go directly to sqlite3BtreeMovetoUnpacked().
FossilOrigin-Name: 53fe685d56368af78238c8981cc41704929f7660
2015-06-29 23:01:32 +00:00
drh
b34755308c
Add a bypass path in sqlite3PagerWrite() for pages with the PGHDR_WRITEABLE
...
bit set, for about a 1% performance increase.
FossilOrigin-Name: ba425a6abb9886e6af87b5f6205202db450beba8
2015-06-29 20:53:18 +00:00
drh
60e32edba5
Combine subjRequiresPage() and subjournalPage() into a single
...
subjournalPageIfRequired() routine.
FossilOrigin-Name: 3b65eb56c422855ca47f709247205f0c77d98a5c
2015-06-29 19:08:18 +00:00
drh
1aacbdb374
Add the PGHDR_WRITEABLE bit for PgHdr.flags which is used to
...
distinguish between pages that are on the dirty list and pages that are
safe to modify.
FossilOrigin-Name: 7c4ef7b7c8744af19075bb96d1e0b63e35978ed1
2015-06-29 18:29:10 +00:00
drh
e399ac2e1e
Fix over-length source code lines in pager.c.
...
FossilOrigin-Name: 14de3d39267a4005a0fa900bab4adc4c104e4084
2015-06-29 18:14:02 +00:00
dan
ef648698c8
Fix minor problems in the ota demo application.
...
FossilOrigin-Name: 6aaaec6e63cdf713b0d67e24a892088ff251c82a
2015-06-29 15:41:50 +00:00
drh
82ef8775c7
Simplifications and performance improvement in pager_write().
...
FossilOrigin-Name: ab7aeeead395a05b91a921ef9ebe9252fffad667
2015-06-29 14:11:50 +00:00
drh
c78ae916b9
Add the new PGHDR_CLEAN bit to PgHdr.flags in pcache.c. This bit is always
...
the opposite of PGHDR_DIRTY. Use the extra bit to avoid a comparison
for a small performance boost.
FossilOrigin-Name: 8619fc346d9a5a66a3c4566b4cc032b6b6bf73fd
2015-06-29 04:21:15 +00:00
drh
234a93fc9c
Very small size reduction and performance increase in sqlite3BitvecTest().
...
FossilOrigin-Name: 9b3a7281bd45994edf813a687e4b7a0761697929
2015-06-29 03:28:43 +00:00
drh
325d087aa7
Move an assert() and testcase() into their correct position within
...
getAndInitPage().
FossilOrigin-Name: 18115164e12509ec21f34598089a7f1310048819
2015-06-29 00:52:33 +00:00
drh
95c91e145a
Use tail recursion in pcache1Unpin() to get a small size reduction and
...
speed improvement.
FossilOrigin-Name: fde70472aebc09b34a517131f676e6847d02b747
2015-06-29 00:21:00 +00:00
drh
b84c14d07c
Comment typo fix and minor cleanup in the pager. No logic changes.
...
FossilOrigin-Name: 94ef17012855b7be725594c34bcea75f34c40190
2015-06-28 17:33:11 +00:00
drh
c5ef7151b0
Avoid unnecessary calls to sqlite3VdbeSerialTypeLen() for integer
...
serial types, for a small size reduction and a speed increase.
FossilOrigin-Name: 9cd30d33b1d02dc8c55c1d74bdbcefab63ebf2a7
2015-06-28 02:58:51 +00:00
drh
c75d886b05
Make greater use of BtCursor.curIntKey.
...
FossilOrigin-Name: 63998471d023dd846d5583ac856e2acc47ad41ea
2015-06-27 23:55:20 +00:00
drh
408efc0664
Add the BtCursor.curIntKey field and use it for a small size reduction and
...
performance boost.
FossilOrigin-Name: 4a17df139ac41e29c9a2e58afbd1238a5e94bd36
2015-06-27 22:49:10 +00:00
drh
15a0021b3e
Enhancements to the previous check-in to make it a little smaller and faster.
...
FossilOrigin-Name: 291d9e0c328a7bd0f255b0b7e819ca2c909701a3
2015-06-27 20:55:00 +00:00
drh
28f58dd60e
Performance improvements in moveToChild() by shifting some work over
...
to getAndInitPage(). Net improvement is about 800K cycles at cost of 30 bytes.
FossilOrigin-Name: 1956a4ce8eca650d98a7f68fd2d82eb8a3d6069f
2015-06-27 19:45:03 +00:00
drh
375beb0ec0
Manually inline the call from getAndInitPage() to btreeGetPage() for a
...
savings of 2.5 million cycles at a cost of less than 100 bytes.
FossilOrigin-Name: 7f65b96b4017413bd19624570efe8fb2b0f7b991
2015-06-27 15:51:06 +00:00
drh
bbf0f867d2
Add releasePageNotNull() as an alternative to releasePage() when the argument
...
is guaranteed to be non-NULL, and use it for a small performance gain.
FossilOrigin-Name: 9383a688701ac2c366a308efc287c9c0f8977d4e
2015-06-27 14:59:26 +00:00
drh
f44890a7c4
Add the Mempage.aDataOfst field and use it in sqlite3BtreeMovetoUnpacked()
...
for about a 2 million cycle gain.
FossilOrigin-Name: bee94dc3510745ba2efa044e8f3299793cfc7e34
2015-06-27 03:58:15 +00:00
mistachkin
95ae9587f1
Treat compilation of FTS5 for the loadable extension specially with MSVC.
...
FossilOrigin-Name: 7c610276bb41dbc80fe169d35fe9a3a3f6525635
2015-06-26 20:45:43 +00:00
dan
ef4f75637c
Merge fts5 branch into trunk.
...
FossilOrigin-Name: d27d9965b5404cd32be1113215fd9feeb5b66acc
2015-06-26 20:25:59 +00:00
dan
55296c5470
Merge latest trunk with this branch.
...
FossilOrigin-Name: 8671b9e137275d247e67e3d7d5d9c4cb1f380ff7
2015-06-26 20:14:23 +00:00
dan
018a93d216
Remove unnecessary lines from fts3.h and main.mk.
...
FossilOrigin-Name: c1b268ced38259706674ed2fcbf842d3fbd9fb8c
2015-06-26 20:13:56 +00:00
dan
6394d99a0e
Fix a segfault that could follow an OOM error in fts5.
...
FossilOrigin-Name: 713239b8cf2900e8f7d97646c7f350248b4e804f
2015-06-26 20:08:25 +00:00
drh
abb78fbd88
Small size reduction and performance increase on the OP_IdxInsert opcode.
...
FossilOrigin-Name: b6bedc2e9c2f87709673799db9401b95fdb386b0
2015-06-26 19:43:55 +00:00
dan
ca0a30cd05
Merge latest trunk changes with this branch.
...
FossilOrigin-Name: 2a1af0f29e4c387721ec1fb3a2b55e8605b8401d
2015-06-26 19:33:04 +00:00
dan
6fbeb22596
Fix some cases in the fts5 code where a corrupt database could cause a buffer overread.
...
FossilOrigin-Name: 360c57bbb8bad6cc84af140f61e0282fa06462b4
2015-06-26 18:50:29 +00:00
drh
e2d9e7cfd0
Further optimization of SQL function dispatch. Improvements to opcode
...
documentation.
FossilOrigin-Name: eaddbf296aee98ffca82adade1b0d2fbefd09d7b
2015-06-26 18:47:53 +00:00
drh
9c7c913cd6
Cache the sqlite3_context structure in the P4 operand of VDBE programs
...
for faster SQL function dispatch.
FossilOrigin-Name: 2abc44eb3b9d489321baa50bc25e17dafbda3687
2015-06-26 18:16:52 +00:00
mistachkin
ec6c0c6e6f
Merge changes to get FTS5 working with MSVC.
...
FossilOrigin-Name: 954231d29d60460d423ecb132bbfb725b0ea375a
2015-06-26 17:10:12 +00:00
mistachkin
a468027c8d
Merge upstream changes. Get the test fixture working with FTS5. Fix compiler warnings.
...
FossilOrigin-Name: bfcd16089cf8c65130c011a9718bf7812685c841
2015-06-26 16:55:55 +00:00
dan
eb37567fe2
Remove fts5 initialization code from core file main.c.
...
FossilOrigin-Name: c91a93b343b4d3b1a19afdb5d23d1c508f9779d2
2015-06-26 16:42:17 +00:00
mistachkin
b39e8cf239
Add FTS5 DLL target for MSVC.
...
FossilOrigin-Name: be85b82499f63dce4378f29adf8366651e965325
2015-06-26 16:17:36 +00:00
mistachkin
ed52f9ff48
Initial changes to get FTS5 working with MSVC.
...
FossilOrigin-Name: ef2052f81e33ca98e85a60f8a78cdd19a7c1c35c
2015-06-26 04:34:36 +00:00
mistachkin
68cdd0eda2
Fix harmless compiler warning in assert statement.
...
FossilOrigin-Name: 7097716caed9d4aef49c7e766e41ea74abf5967f
2015-06-26 03:12:27 +00:00
drh
39065c60b3
Simplify the pcache by not keeping continuous track of page 1 but instead
...
just loading page 1 on the rare occasions when it is actually needed.
FossilOrigin-Name: 015302f15e46a087ec92f3644c6741600dbf4306
2015-06-26 02:41:31 +00:00
drh
591909c344
Optimization to sqlite3_value_bytes() for the common case that does not
...
require a data transformation.
FossilOrigin-Name: 8d79f3a1443391bee204bb8c49240f44477168db
2015-06-25 23:52:48 +00:00