diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index 2cef1afe7b..3292fd801d 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -1123,6 +1123,11 @@ Zotero.DBConnection.prototype._getDBConnection = function () { Zotero.DB.query("PRAGMA locking_mode=NORMAL"); } + // Set page cache size to 8MB + var pageSize = Zotero.DB.valueQuery("PRAGMA page_size"); + var cacheSize = 8192000 / pageSize; + Zotero.DB.query("PRAGMA cache_size=" + cacheSize); + // Register idle and shutdown handlers to call this.observe() for DB backup var idleService = Components.classes["@mozilla.org/widget/idleservice;1"] .getService(Components.interfaces.nsIIdleService); diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 74b6f189df..6aaed2042c 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -2283,11 +2283,6 @@ Zotero.Schema = new function(){ Zotero.wait(); - // Set page cache size to 8MB - var pageSize = Zotero.DB.valueQuery("PRAGMA page_size"); - var cacheSize = 8192000 / pageSize; - Zotero.DB.query("PRAGMA default_cache_size=" + cacheSize); - // Orphaned child attachment Zotero.DB.query("UPDATE itemAttachments SET sourceItemID=NULL WHERE sourceItemID NOT IN (SELECT itemID FROM items)"); Zotero.DB.query("UPDATE itemNotes SET sourceItemID=NULL WHERE sourceItemID NOT IN (SELECT itemID FROM items)");