> On Apr 6, 2016, at 8:45 AM, James Cicenia <ja...@jimijon.com> wrote:
> 
> This is only at the install. The WAL file grows to over 500MB. Then when the 
> app is restarted this WAL file is truncated and app goes down to about 35MB.

Oh, you mean _disk_ storage. I thought you meant RAM.

Looking through the WAL docs <https://www.sqlite.org/wal.html> I think what you 
want is "PRAGMA wal_autocheckpoint=N” where N is the number of (4k) pages the 
WAL can grow to. Although the docs imply that the WAL is checkpointed (merged 
into the b-tree) only when a transaction commits, so if Core Data is holding a 
transaction open for a very long time this might not take effect.

The default wal_autocheckpoint value is 1000, which would be about 4MB, so it 
seems weird that it would grow to hundreds of megabytes. Again, it might have 
to do with inserting tons of data in a single long-lived transaction.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to