/ File History
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of src/pcache.c

2018-11-22
19:10
Fix a problem reading from temp databases in SQLITE_DIRECT_OVERFLOW_READ builds. file: [696a01f1] check-in: [81629ba9] user: dan branch: trunk, size: 29676
2018-09-21
19:06
Comment typo fixed. No code changes. file: [4196eb6e] check-in: [7e68cdab] user: drh branch: trunk, size: 29474
2018-03-12
21:09
Fix a typo causing SQLITE_LOG_CACHE_SPILL builds to fail. file: [135ef0bc] check-in: [0171d4a7] user: dan branch: trunk, size: 29474
2017-10-31
03:40
Remove unnecessary NEVER() and ALWAYS() conditionals. file: [7ae91a45] check-in: [1c80c75d] user: drh branch: trunk, size: 29473
2017-09-01
12:57
Remove an obsolete optimization in pcache that due to more recent changes was recently making the code a little slower. file: [4bada070] check-in: [c4e7e175] user: drh branch: trunk, size: 29499
12:18
Small size and performance improvement in pcacheManageDirtyList() by not zeroing the PgHdr.pDirtyNext and PgHdr.pDirtyPrev pointers for PgHdr objects that are not on the dirty list. file: [f7918197] check-in: [919863b1] user: drh branch: trunk, size: 29791
2017-02-13
13:35
Change all legacy instances of "#if SQLITE_DEBUG" to "#ifdef SQLITE_DEBUG" for consistency. file: [62835bed] check-in: [670f10b2] user: drh branch: trunk, size: 29901
2016-12-13
18:34
In the pager, avoid checking for the illegal page number 0 except when creating a new page. file: [51070ec9] check-in: [dee20ba9] user: drh branch: pager-get-method, size: 29898
2016-12-09
16:02
Avoid unnecessary zeroing of fields in the MemPage object that are going to be reinitialized before use anyhow. A smaller and faster binary results. file: [219fc523] check-in: [01ada3d1] user: drh branch: trunk, size: 29900
2016-10-01
20:43
Reduce the width of a memset() to avoid double-initializing some variables. file: [5ff2a08f] check-in: [34edbfd1] user: drh branch: trunk, size: 29549
2016-05-20
20:58
Fix typo in comment. file: [5583c8ad] check-in: [9db8f214] user: mistachkin branch: trunk, size: 29515
14:54
Optimizations to link list merge sort code in vdbesort.c, pcache.c, and rowset.c. Resulting binaries are 10 bytes smaller and use 0.03% fewer CPU cycles. file: [50fb5728] check-in: [9033afbb] user: drh branch: trunk, size: 29513
2016-05-13
17:22
Improvements to a comment in the pcache.c file. No changes to code. file: [f398c008] check-in: [b369980f] user: drh branch: trunk, size: 29430
15:22
Remove the unused PGHDR_NEED_READ flag. Add invariant checking (during SQLITE_DEBUG builds only) for the PgHdr object. file: [e93f1e1b] check-in: [771c5411] user: drh branch: trunk, size: 29040
04:24
Additional debugging and tracing logic for pcache.c, turned off by default using an "#if 0". file: [ad5ce697] check-in: [32a62e3b] user: drh branch: trunk, size: 26679
2016-05-12
17:06
Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c. file: [3ef140ad] check-in: [9d55b8f5] user: dan branch: trunk, size: 25750
12:08
For in-memory databases, it does not matter if pcache entries are marked "clean" or "writable". file: [5291b6ab] check-in: [06c1e27c] user: drh branch: trunk, size: 25509
12:01
Remove an unnecessary call to sqlite3PcacheMakeClean() inside of the ROLLBACK logic. file: [0e8453c2] check-in: [0dc50d99] user: drh branch: trunk, size: 25193
09:48
Add a missing OPTIMIZATION-IF-FALSE comment to pcache.c. file: [481e549d] check-in: [bc202e5b] user: dan branch: trunk, size: 25182
2016-05-11
23:54
For in-memory databases, it does not matter if pcache entries are marked "clean" or "writable". file: [132a78c7] check-in: [ad601c79] user: drh branch: pager-dev, size: 25102
20:03
Remove a redundant condition from pcache.c. Add an OPTIMIZATION-IF-TRUE comment to another condition that requires it. file: [95ee5008] check-in: [3bfd2621] user: dan branch: trunk, size: 24786
18:20
Remove a redundant condition from pcache.c. Add an OPTIMIZATION-IF-TRUE comment to another condition that requires it. file: [d7e1dd55] check-in: [4533ed35] user: dan branch: mistake, size: 24786
15:41
Remove some a small amount of redundant code related to PCache.pSynced from pcache.c. file: [4af980bc] check-in: [9cc8cad7] user: dan branch: trunk, size: 24369
10:57
Add pcache tracing macros. Off by default. Requires changing an "#if 0" and recompiling to enable. file: [c128cafa] check-in: [d9313d19] user: drh branch: trunk, size: 23329
2016-04-18
13:30
sqlite3PCachePerecentDirty() should return 0 if the pcache is empty. file: [b3230ecf] check-in: [85f3d80e] user: drh branch: tempfiles-25, size: 22334
2016-04-13
16:52
On commit, flush dirty temp-file pages only if the file is already open and 25% or more of the cache is dirty. file: [d63b34cc] check-in: [f6babf29] user: dan branch: tempfiles-25, size: 22321
2016-04-05
21:07
Defer opening the file used for the temp database (where CREATE TEMP TABLE tables are stored) until the database is too large to reside entirely within the cache. There are likely still problems on this branch. file: [e9c00846] check-in: [be5a549e] user: dan branch: tempfiles-lazy-open, size: 21959
2016-02-13
23:43
Enhance ability to debug out-of-memory errors. file: [647bb53a] check-in: [6a9c4a3e] user: mistachkin branch: noMemBkpt, size: 21681
2015-11-12
15:47
Test cases. Minor problems fixed. All appears to work now. file: [73895411] check-in: [9a431362] user: drh branch: cache_spill=N, size: 21671
14:57
First attempt at enhancing the "PRAGMA cache_spill" statement to accept a cache threashold size. file: [f72f1995] check-in: [549d42be] user: drh branch: cache_spill=N, size: 21675
2015-09-03
20:43
Change the pcache module to keep track of the total number of references to all pages rather than the number of pages references, for a performance improvement and size reduction. file: [24be750c] check-in: [f00a9e1e] user: drh branch: trunk, size: 20971
2015-06-30
03:57
Optimization to the sqlite3PcacheFetch() logic. file: [cde06aa5] check-in: [d9a0481c] user: drh branch: trunk, size: 20846
2015-06-29
18:29
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. file: [379fd77f] check-in: [7c4ef7b7] user: drh branch: trunk, size: 20850
04:21
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. file: [994f15b4] check-in: [8619fc34] user: drh branch: trunk, size: 20834
2015-06-26
02:41
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. file: [d8b19632] check-in: [015302f1] user: drh branch: trunk, size: 20593
2015-02-27
21:53
Remove all references to SQLITE_DEFAULT_TEMP_CACHE_SIZE. Add requirements marks related to cache_size changing. file: [10539fb9] check-in: [766ad650] user: drh branch: trunk, size: 20605
2015-01-09
19:45
Remove an unused preprocessor macro from pcache.c. file: [d210cf90] check-in: [88a7a967] user: drh branch: trunk, size: 20214
2014-12-30
13:04
Make SQLITE_CONFIG_PCACHE_HDRSZ accurate (not an over-estimate) on 32-bit systems. file: [b83d160c] check-in: [340b3477] user: drh branch: trunk, size: 20590
00:57
Round all object sizes that go into computing SQLITE_CONFIG_PCACHE_HDRSZ up to a multiple of 8 bytes. file: [8ee2ce15] check-in: [b28ce75f] user: drh branch: trunk, size: 20566
2014-11-04
12:11
Add the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config(). file: [ace1b676] check-in: [6eb03e62] user: drh branch: trunk, size: 20558
2014-09-15
14:59
Remove the EXPENSIVE_ASSERTS in pcache.c having to do with the pSynced field of the Pcache object, as they are incorrect, as revealed by recent pcache enhancements. file: [4121a057] check-in: [69a64560] user: drh branch: trunk, size: 20395
2014-09-12
20:30
Small performance improvement to the dirty list handling in the pager. file: [b42c513d] check-in: [b332a84d] user: drh branch: trunk, size: 21159
2014-09-06
16:39
Fix typos in comments. No code changes. file: [2048affd] check-in: [e62aab5e] user: peter.d.reid branch: trunk, size: 21149
2014-08-27
23:18
Refactor the sqlite3PcacheFetch() routine into three separate routines, which are significantly faster overall and about 100 bytes smaller in size as well. file: [3b379129] check-in: [bdb6e497] user: drh branch: trunk, size: 21147
2014-08-26
15:06
Change the page cache so that a new sqlite3_pcache object is allocated as soon as the page cache is opened, not delayed until the first fetch request. This give a noticable performance boost. The interface between pager and the page cache has changed slightly, which might break ZIPVFS. file: [c216e407] check-in: [f1f94a97] user: drh branch: trunk, size: 18378
2014-08-22
20:35
Combine the pcacheAddToDirtyList() and pcacheRemoveFromDirtyList() routines into a single pcacheManageDirtyList() routine. The resulting binary code is slightly faster and a few bytes smaller. file: [da602c54] check-in: [6bcf1af6] user: drh branch: trunk, size: 18401
2014-02-03
17:04
Performance optimizations in sqlite3PcacheFetch(). file: [d8eafac2] check-in: [b60cc11e] user: drh branch: trunk, size: 17855
2012-01-02
15:45
Make sure large negative arguments to PRAGMA cache_size do not cause 32-bit signed integer overflow. Also correct a requirements mark. file: [f8043b43] check-in: [17c30634] user: drh branch: trunk, size: 17142
2011-11-16
19:29
Add the sqlite3_db_release_memory() interface and the shrink_memory pragma. file: [1fdd7797] check-in: [3f58e7c8] user: drh branch: trunk, size: 17130
2011-11-14
12:34
Further work on mmap(). Still does not work right - autovacuum tests are the first to fail. file: [e9246c20] check-in: [638a39bb] user: drh branch: mmap-experimental, size: 16949
01:55
Begin making experimental changes to use mmap() for reading content from a database. The code compiles, but crashes on the test suite. file: [ccbd5b12] check-in: [09be42d5] user: drh branch: mmap-experimental, size: 16949
2011-11-09
14:23
A negative value N for the cache_size pragma adjusts the number of cache pages to use approximately N kibibytes of memory. file: [b9d52e9f] check-in: [b3faa680] user: drh branch: experimental-pcache, size: 16935
00:06
Update the API documentation for the new pcache2 interface. Change the order of parameters on the xCreate method of pcache2. file: [8820564f] check-in: [4da70956] user: drh branch: experimental-pcache, size: 16609
2011-11-08
20:08
Experimental change to the pcache interface to allow page buffers to be allocated separately from their associated container structures. file: [fad86466] check-in: [c275c9d3] user: dan branch: experimental-pcache, size: 16609
2011-05-28
15:53
Print a log message on each cache spill if compiled with SQLITE_LOG_CACHE_SPILL. file: [49e718c0] check-in: [5f15579f] user: drh branch: trunk, size: 16540
2010-09-09
18:25
Further updates to the sqlite3_pcache_methods documentation, plus the addition of a few evidence marks related to pcache. file: [09d38c44] check-in: [34edb54b] user: drh branch: trunk, size: 16256
2010-06-10
06:53
Store the MemPage structure in memory following, instead of preceding, the page data for cached pages. This reduces the likelihood of a corrupt database page image causing SQLite to read past the end of a buffer. file: [1e9aa2db] check-in: [0ce42e76] user: dan branch: trunk, size: 15997
2010-03-19
19:23
Put an ALWAYS() around a condition in pcache.c that must always be true in the current implementation. file: [ace8f6a5] check-in: [88810cd0] user: drh branch: trunk, size: 15902
2010-03-02
23:34
When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory. file: [4956b41d] check-in: [9daf4e7d] user: drh branch: trunk, size: 15682
2010-02-04
17:38
Fix a performance glitch that appears for large transactions. file: [815bcb3c] check-in: [26cb1df7] user: drh branch: trunk, size: 15658
2009-11-10
01:30
Remove the obsolete "$Id:$" RCS identifier strings from the source code. file: [3b079306] check-in: [f6c045f6] user: drh branch: trunk, size: 15631
2009-07-25
11:46
Add files that should have gone in with the previous checkin. (CVS 6935) file: [c92ffd4f] check-in: [64c7afc7] user: danielk1977 branch: trunk, size: 15701
2009-07-21
19:25
Change getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and PagerAcquire(). (CVS 6916) file: [1dae135b] check-in: [0b41dfc0] user: danielk1977 branch: trunk, size: 15670
2009-07-16
18:21
Code simplifications and comment improvements in support of structural coverage testing. (CVS 6899) file: [7d27635a] check-in: [94525179] user: drh branch: trunk, size: 15659
2009-03-31
01:32
Remove two unused lines from pcache.c. (CVS 6415) file: [395f752a] check-in: [d5cab05c] user: drh branch: trunk, size: 15734
2009-01-23
16:45
Optimization: When loading a new page into the cache, avoid redundant memset() calls to zero it. (CVS 6201) file: [fcf7738c] check-in: [9c0b9f88] user: danielk1977 branch: trunk, size: 15784
2009-01-20
17:06
Big change to make pager.c easier to follow. Unused variables removed, comments improved, etc. (CVS 6197) file: [48fbfc22] check-in: [12f7346c] user: danielk1977 branch: trunk, size: 15557
2009-01-16
16:23
Revert (6187). (CVS 6188) file: [a3c729f4] check-in: [a353c1ab] user: danielk1977 branch: trunk, size: 15619
15:21
This commit is an error. Reverted by (6188). (CVS 6187) file: [922872b2] check-in: [aa67fd0c] user: danielk1977 branch: trunk, size: 15600
2008-12-04
20:40
Replace the VDBE Fifo object with the new RowSet object. (CVS 5977) file: [16dc8da6] check-in: [39a0750b] user: drh branch: trunk, size: 15611
2008-11-19
16:52
Fix some compiler warnings that show up when building the amalgamation only. (CVS 5927) file: [f3121a53] check-in: [d1abe8a1] user: danielk1977 branch: trunk, size: 15620
2008-11-13
14:28
Add an API to support custom page cache implementations. (CVS 5899) file: [439bcf16] check-in: [47866d67] user: danielk1977 branch: trunk, size: 15594
2008-11-11
18:43
Remove some asserts that refer to variables removed in (5830). (CVS 5884) file: [3d547c39] check-in: [9d880a6f] user: danielk1977 branch: trunk, size: 33870
00:36
When an assignment occurs in a boolean, always test the result using "!=0" to avoid confusion and make it clear that assignment is intended, not an equality test. Ticket #3491. (CVS 5879) file: [81ded336] check-in: [89ee5295] user: drh branch: trunk, size: 33920
2008-10-17
18:51
Add "pragma journal_mode=memory". Change the way rollback works for in-memory databases so that it reuses the journal_mode=memory code. (CVS 5830) file: [5b80676e] check-in: [39ebf01a] user: danielk1977 branch: trunk, size: 33909
2008-09-29
11:49
Instead of storing a pointer to the parent page in the MemPage structure, have each B-Tree cursor keep track of the ancestry of the current page. (CVS 5747) file: [f8d7bece] check-in: [40425e93] user: danielk1977 branch: trunk, size: 36032
2008-09-24
09:12
Fix some function declarations (change "int foo()" to "int foo(void)"). Ticket #3399. (CVS 5740) file: [52108517] check-in: [0fb98c35] user: danielk1977 branch: trunk, size: 36198
2008-09-21
15:14
Give file scope to non-API routines in pcache. Ticket #3392. (CVS 5727) file: [e2a4dd0a] check-in: [6521f98a] user: drh branch: trunk, size: 36182
2008-09-18
17:34
Avoid parsing the structure of b-tree pages (in sqlite3BtreeInitPage) more than is necessary. (CVS 5720) file: [e025e538] check-in: [6b998f30] user: danielk1977 branch: trunk, size: 36162
2008-09-17
20:06
Speed improvements for in-memory databases by omitting flag clearing on pages where it is impossible for the flag to be set and by avoiding assert()s on non-debugging builds. Ticket #3384. (CVS 5715) file: [c799d753] check-in: [a7fd9e62] user: drh branch: trunk, size: 35936
11:02
Add a type identifier to argument sz to sqlite3PageMalloc() in pcache.c. Ticket #3383. (CVS 5713) file: [a39908e7] check-in: [94fde77b] user: danielk1977 branch: trunk, size: 35845
2008-09-15
15:36
Adjust the page recycling algorithm so that the number of pages allocated to each connection does not exceed its cache_size limit. (CVS 5701) file: [d3c0f4ad] check-in: [3bc221b9] user: drh branch: trunk, size: 35833
2008-09-02
09:38
Modify pcache.c to work with OMIT_WSD. (CVS 5659) file: [ff79cb5e] check-in: [44def90d] user: danielk1977 branch: trunk, size: 35675
2008-09-01
18:34
Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652) file: [200de27e] check-in: [573d92ab] user: danielk1977 branch: trunk, size: 35250
2008-08-29
09:10
If a page is made eligible for recycling when more than the configured maximum number of pages are allocated, free it immediately instead of adding it to the LRU list. (CVS 5638) file: [e1cb0e77] check-in: [4b12922d] user: danielk1977 branch: trunk, size: 35244
2008-08-28
17:46
Partial fix for a bug in recovery from xStress failures in pcache. (CVS 5635) file: [4853068c] check-in: [44193b92] user: drh branch: trunk, size: 34299
11:12
Fix mutex related bug in pcache.c to do with handling IO errors. (CVS 5632) file: [c45e2440] check-in: [5e304fed] user: danielk1977 branch: trunk, size: 34288
10:21
Enable the disabled asserts added by (5629). Add extra tests to thread003.test. And the required modifications to pcache.c. (CVS 5631) file: [23dba1a9] check-in: [473c09fa] user: danielk1977 branch: trunk, size: 34288
08:31
Fix a threads/mutex problem in pcache.c. (CVS 5630) file: [8a2d92fb] check-in: [1928f15b] user: danielk1977 branch: trunk, size: 34312
02:26
Miscellaneous cleanup in the new pcache code. (CVS 5629) file: [aa609c9b] check-in: [da177725] user: drh branch: trunk, size: 34293
2008-08-27
16:38
Modifications to malloc5.test to account for the fact that sqlite3_release_memory() no longer reclaims dirty pages. (CVS 5625) file: [3d9d933b] check-in: [b01c65b0] user: danielk1977 branch: trunk, size: 32639
15:16
Use a bitvec object to store the set of pages with the 'always-rollback' property for a transaction. (CVS 5622) file: [94050f68] check-in: [9e932599] user: danielk1977 branch: trunk, size: 32617
09:44
Remove unreachable branches from pcache.c. (CVS 5620) file: [9e00544d] check-in: [7de32498] user: danielk1977 branch: trunk, size: 32924
2008-08-26
19:08
Disable some very expensive asserts in pcache.c that are too slow for all.test. (CVS 5616) file: [006714ad] check-in: [555dad90] user: danielk1977 branch: trunk, size: 32705
18:05
Simplify the pcache module by only recycling clean pages from 'other' caches. This commit causes errors in test files ioerr5.test and malloc5.test because they test recycling dirty pages from other caches. (CVS 5615) file: [03c2ad23] check-in: [9e511e16] user: danielk1977 branch: trunk, size: 32628
2008-08-25
14:49
Pick up a small performance increase by eliminating the pcacheRef() function. (CVS 5609) file: [4883f371] check-in: [e3840fbf] user: danielk1977 branch: trunk, size: 33756
07:12
If the sector size is greater than the database page size, SQLite journals all pages that lie within a sector before writing to any of them. This change ensure that a journal sync does not occur halfway through journalling the set of pages that belong to a single sector. (CVS 5605) file: [67c402c2] check-in: [16f612d6] user: danielk1977 branch: trunk, size: 34302
2008-08-23
18:53
Instead of marking a page as clean when sqlite3PagerDontWrite() is called, set a dedictated flag - PGHDR_DONT_WRITE. (CVS 5604) file: [4858bf42] check-in: [a323bd29] user: danielk1977 branch: trunk, size: 33921
2008-08-22
17:34
Remove dead code. (CVS 5601) file: [3feb47f5] check-in: [6de9c084] user: drh branch: trunk, size: 33880
17:09
Relinquish the pcache mutex before calling an xStress callback. This ensures that the pcache mutex is never held while IO is performed. (CVS 5599) file: [504e6204] check-in: [8fe234b2] user: danielk1977 branch: trunk, size: 33841
16:22
When recycling a page, try to find one that does not require a call to xSync() on the journal file. Also simplify some of the mutex related things in pcache. (CVS 5597) file: [e12359db] check-in: [93dbc542] user: danielk1977 branch: trunk, size: 34431
2008-08-21
20:21
Move date+time functions to start-time initialization. Additional start-time function cleanup. (CVS 5585) file: [f5722700] check-in: [80d6a31c] user: drh branch: trunk, size: 33784
15:54
Fix soft-heap-limit related test suite failures. (CVS 5582) file: [46684100] check-in: [2091d9a5] user: danielk1977 branch: trunk, size: 33793
12:32
Patch to mkfunction to try and detect miscompiles. Add an unimportant assert back to pcache.c. (CVS 5577) file: [54d03c35] check-in: [a2f375ff] user: drh branch: trunk, size: 32923
12:19
Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576) file: [614f927e] check-in: [d025866b] user: danielk1977 branch: trunk, size: 32871
04:41
Move an assert() in sqlite3PcacheDirtyPage() so that it does not occur before local variable declarations. Ticket #3325. (CVS 5575) file: [e244ef4b] check-in: [899fa19d] user: danielk1977 branch: trunk, size: 31546
2008-08-20
21:47
Comment and function naming tweaks to pcache. No functionality changes. (CVS 5572) file: [cf7a7c81] check-in: [4b0e67d3] user: drh branch: trunk, size: 31538
14:49
Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566) file: [c1a9abb5] check-in: [cb494e10] user: danielk1977 branch: trunk, size: 31157 Added