If you have a web app that is using local storage so heavily that it causes performance issues, I would contact the web app author and let them know, so perhaps they can fix it.
However, SQLite does have a mode since version 3.7.0 called write-ahead logging which uses fewer fsync operations. Since newer versions of Chrome and Firefox both use at least version 3.7.0 of SQLite, you may be able to set WAL mode on your local storage database, and it ought to persist when Chrome and Firefox start using it.
You will need the sqlite3 executable. Close Chrome first, then run the following commands:
sqlite> PRAGMA journal_mode=WAL;
(When you run the
PRAGMA command, you should get back the result "
The same commands would be used to set WAL mode for the Firefox database, substituting
To undo this setting, run the same commands, except use
Please note that I have not tried this myself; my guess is that it will work fine, but I urge you to backup the database file before trying it.
As an aside, the
*.sqlite-journal files you are seeing in Filemon are part of how SQLite performs an atomic commit. By default, the journal file exists only for a very short time. When committing a change to a SQLite database, the following actions happen:
- The current data is written to the journal file.
- The new data is written to the database file.
- The journal file is deleted.
If the computer crashes in the middle of writing the database file, the journal file is used to recover the database back to before the change ever started.