Support enabling WAL using a flag when DB is opened.
Using enableWriteAheadLogging() to enable WAL is inefficient because we previously disabled WAL mode when the database was opened. Switching from WAL to PERSIST then back to WAL is inefficient and could slow down application launch time. It would be better to leave the database in WAL mode when we open it to begin with. To do that, we need to know ahead of time whether we will want to have WAL enabled for the newly opened database. Using this flag also reduces the chance that we will encounter an error enabling WAL mode due to there being other open connections to the database. Bug: 6124556 Change-Id: I38ec7a528baeda9f1ef77e25e88b3ca4b6296200
Loading
Please register or sign in to comment