Permalink
Browse files

bug 608422 - cookies.sqlite-wal takes too much space for Fennec r=sdw…

…ilsh a=blocking-fennec

--HG--
branch : GECKO20b7pre_20101029_RELBRANCH
  • Loading branch information...
djwitte committed Oct 31, 2010
1 parent 354565d commit dac7bdaa9349c9f89942b0f24602e1f3dea29217
Showing with 4 additions and 1 deletion.
  1. +4 −1 netwerk/cookie/nsCookieService.cpp
@@ -956,8 +956,11 @@ nsCookieService::TryInitDB(PRBool aDeleteExistingDB)
// make operations on the table asynchronous, for performance
mDBState->dbConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA synchronous = OFF"));
- // Use write-ahead-logging for performance.
+ // Use write-ahead-logging for performance. We cap the autocheckpoint limit at
+ // 16 pages (around 500KB).
mDBState->dbConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA journal_mode = WAL"));
+ mDBState->dbConn->ExecuteSimpleSQL(NS_LITERAL_CSTRING(
+ "PRAGMA wal_autocheckpoint = 16"));
// cache frequently used statements (for insertion, deletion, and updating)
rv = mDBState->dbConn->CreateStatement(NS_LITERAL_CSTRING(

0 comments on commit dac7bda

Please sign in to comment.