[sqlite] sqlite3_release_memory when SQLITE_THREADSAFE=0

2015-03-16 Thread Xavier Snelgrove
Hi Simon, Well in my case the linked threadsafe.html documentation won't be helpful, because it looks like at runtime I can only downgrade as far as multi-thread mode, not single-thread mode, and it's in single-thread mode where I'm really seeing a significant performance advantage. I think the p

[sqlite] sqlite3_release_memory when SQLITE_THREADSAFE=0

2015-03-15 Thread Simon Slavin
On 13 Mar 2015, at 6:26pm, Xavier Snelgrove wrote: > Are there any other options here? Does the last section of help you in your situation ? Alternatively you might be able to use to manually maintain

[sqlite] sqlite3_release_memory when SQLITE_THREADSAFE=0

2015-03-13 Thread Xavier Snelgrove
Hello, I'm using SQLite extensively (thanks for the great tool!) in an application where it's almost exclusively accessed on a single thread. I have found that the SQLITE_THREADSAFE=0 compile-time option gives us a 3% improvement in overall performance by removing mutex overhead. However: there a

Re: [sqlite] sqlite3_release_memory() current status

2009-10-26 Thread D. Richard Hipp
On Oct 26, 2009, at 6:16 PM, D. Richard Hipp wrote: > > The memory management has undergone multiple rewrites in the previous > two years, but as far as we know, sqlite3_release_memory() still works > as advertised. Please let us know if you find otherwise. FWIW, with the latest changes we now h

Re: [sqlite] sqlite3_release_memory() current status

2009-10-26 Thread D. Richard Hipp
On Oct 26, 2009, at 5:53 PM, Peter Kasting wrote: > On Mon, Oct 26, 2009 at 2:48 PM, D. Richard Hipp > wrote: > >> On Oct 26, 2009, at 5:00 PM, Peter Kasting wrote: >>> as >>> far as >>> I can tell the current code shouldn't cause any performance hit by >>> enabling >>> this flag. There's no

Re: [sqlite] sqlite3_release_memory() current status

2009-10-26 Thread Peter Kasting
On Mon, Oct 26, 2009 at 2:48 PM, D. Richard Hipp wrote: > On Oct 26, 2009, at 5:00 PM, Peter Kasting wrote: > > as > > far as > > I can tell the current code shouldn't cause any performance hit by > > enabling > > this flag. There's no additional monitoring/tracking it causes; it > > just > > ex

Re: [sqlite] sqlite3_release_memory() current status

2009-10-26 Thread D. Richard Hipp
On Oct 26, 2009, at 5:00 PM, Peter Kasting wrote: > Close to two years ago, Shawn Wilsher from Mozilla asked about freeing > memory used by sqlite ( > http://www.mail-archive.com/sqlite-users@sqlite.org/ > msg30585.html ). At the > time, some benchmarks showed that setting > -DSQLITE_ENABLE_MEM

[sqlite] sqlite3_release_memory() current status

2009-10-26 Thread Peter Kasting
Close to two years ago, Shawn Wilsher from Mozilla asked about freeing memory used by sqlite ( http://www.mail-archive.com/sqlite-users@sqlite.org/msg30585.html ). At the time, some benchmarks showed that setting -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 caused a small performance hit. I'm looking into

Re: [sqlite] sqlite3_release_memory Question

2008-01-11 Thread Roger Binns
Shawn Wilsher wrote: > That got me looking into sqlite3_release_memory. DRH would need to answer this precisely, but I believe that SQLite will free up almost all memory anyway if you have called sqlite3_close() on all open handles. Roger -

Re: [sqlite] sqlite3_release_memory Question

2008-01-11 Thread drh
"Shawn Wilsher" <[EMAIL PROTECTED]> wrote: > Hmm, the documentation (http://sqlite.org/compile.html) doesn't seem > to say anything about [sqlite3_release_memory() only working if > SQLITE_ENABLE_MEMORY_MANAGEMENT=1 is used]. Is there a cost to > pay by enabling those functions, or no? > There

Re: [sqlite] sqlite3_release_memory Question

2008-01-11 Thread Shawn Wilsher
Hmm, the documentation (http://sqlite.org/compile.html) doesn't seem to say anything about that. Is there a cost to pay by enabling those functions, or no? Cheers, Shawn On Jan 11, 2008 8:42 AM, <[EMAIL PROTECTED]> wrote: > "Shawn Wilsher" <[EMAIL PROTECTED]> wrote: > > Hey all, > > > > Over i

Re: [sqlite] sqlite3_release_memory Question

2008-01-11 Thread drh
"Shawn Wilsher" <[EMAIL PROTECTED]> wrote: > Hey all, > > Over in Mozilla land, we are looking for ways to free up as much > memory as possible on demand. That got me looking into > sqlite3_release_memory. However, the docs say that it tries to free > up to N bytes, but that it could free more o

[sqlite] sqlite3_release_memory Question

2008-01-11 Thread Shawn Wilsher
Hey all, Over in Mozilla land, we are looking for ways to free up as much memory as possible on demand. That got me looking into sqlite3_release_memory. However, the docs say that it tries to free up to N bytes, but that it could free more or less. My question is, how do we get it to free as mu

[sqlite] sqlite3_release_memory

2007-06-14 Thread B V, Phanisekhar
sqlite3_release_memory(int n) internally calls sqlite3pager_release_memory(int n) A negative value of input n implies free as much as you can. Suppose if the no of pages in cache = x. Will all the pages be freed when I call sqlite3_release_memory with a negative argument? If not, then what make