Description
[REQUIRED] Describe your environment
- Operating System version: iOS WKWebView
- Firebase SDK version: 5.0.4
- Firebase Product: firestore
[REQUIRED] Describe the problem
We notice a huge increase on application data when use firestore on hybrid iOS WKWebView application.
Almost Each time run the iOS application an increase in application data size from 1MB to 5MB; reach 140MB in a few hours while my original Firestore DB size not more than 1 MB with less than 100 doc.
notice that on each application load we didn't read and write more than 10 docs.
To detect the increment we download the device application container through xCode; at application container we found the source of increment on the following file; IndexedDB.sqlite3-wal
and this was the location of file at container:
AppData/Library/WebKit/WebsiteData/IndexedDB/file__0/firestore%2F[DEFAULT]%2FappName%2Fmain/IndexedDB.sqlite3-wal
according to https://www.sqlite.org/tempfiles.html
2.2. Write-Ahead Log (WAL) Files
A write-ahead log or WAL file is used in place of a rollback journal when SQLite is operating in WAL mode. As with the rollback journal, the purpose of the WAL file is to implement atomic commit and rollback. The WAL file is always located in the same directory as the database file and has the same name as the database file except with the 4 characters "-wal" appended. The WAL file is created when the first connection to the database is opened and is normally removed when the last connection to the database closes. However, if the last connection does not shutdown cleanly, the WAL file will remain in the filesystem and will be automatically cleaned up the next time the database is opened.
Any idea?