Post

Replies

Boosts

Views

Activity

Reply to Core Data sqlite-wal file exploding in size
In my case it was around 1 gb, because I was inserting blobs at regular intervals 5 seconds, I used journal_mode = Delete and was able to get rid of sqlite-wal file but however I noticed that anything I write to coredata was not synced to cloud and this was the biggest setback for me. So I tried every possible such as writing the blobs to text and syncing it to icloud docs, but this involves lot of manual work because you need to upload the entire blob file rather than just the updated content and eventually this will slow down my app. Finally I realised if I could increase the intervals to 60 seconds the file size reduced to < 100 kb which was ok for me, if the app crashes this piece of data will be lost and hence I introduced userdefaullts as intermediatery handler for the 60 seconds and once its inserted to coredata I would just clear userdefaults for next cycle. This way I brought 1 gb file to <100 kb.
Sep ’21