bug 608422 - cookies.sqlite-wal takes too much space for Fennec r=sdwilsh a=blocking-fennec GECKO20b7pre_20101029_RELBRANCH FENNEC_4_0b2_BUILD2
authorDan Witte <dwitte@gmail.com>
Sat, 30 Oct 2010 22:32:45 -0400
branchGECKO20b7pre_20101029_RELBRANCH
changeset 56790 57bc64a3949f
parent 56701 35b148bd6ba0
child 56807 dc3e6b6b0ddd
push idunknown
push userunknown
push dateunknown
reviewerssdwilsh, blocking-fennec
bugs608422
milestone2.0b7pre
bug 608422 - cookies.sqlite-wal takes too much space for Fennec r=sdwilsh a=blocking-fennec
netwerk/cookie/nsCookieService.cpp
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -951,18 +951,21 @@ nsCookieService::TryInitDB(PRBool aDelet
       }
       break;
     }
   }
 
   // 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(
     "INSERT INTO moz_cookies ("
       "baseDomain, "
       "name, "
       "value, "
       "host, "