Skip to content

Commit 9ac2d3b

Browse files
author
Jeff Brown
committed
Do not enable WAL mode for the WebView database.
There is no need to enable WAL for the WebView database because it does not require high throughput. Enabling WAL increases memory usage and can also cause problems if the same database is opened in multiple processes, which can happen if an application has UI code running in multiple processes. Normally, we would use a content provider to ensure that the database is only opened within one process (and then accessed remotely view RPC), but we can't do that for WebView because it is part of the framework. Deleted the call to setLockingEnabled. It does nothing. Bug: 6124556 Change-Id: Ic397c74872fe6b1246da0c859eab0d5147045c86
1 parent d67c8c6 commit 9ac2d3b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

core/java/android/webkit/WebViewDatabase.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ private void initDatabase(Context context) {
144144
null);
145145
}
146146
}
147-
mDatabase.enableWriteAheadLogging();
148147

149148
// mDatabase should not be null,
150149
// the only case is RequestAPI test has problem to create db
@@ -163,11 +162,6 @@ private void initDatabase(Context context) {
163162
mDatabase.endTransaction();
164163
}
165164
}
166-
167-
// use per table Mutex lock, turn off database lock, this
168-
// improves performance as database's ReentrantLock is
169-
// expansive
170-
mDatabase.setLockingEnabled(false);
171165
}
172166

173167
private static void upgradeDatabase() {

0 commit comments

Comments
 (0)