commit b20a7a572c9fd61a62c434951e09adf565219f6f
parent 8b918b21addf6cf440eebe6297d2a480cb499908
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 6 Aug 2013 16:02:49 -0400
Disable some debug logging for file syncing
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -705,7 +705,7 @@ Zotero.Sync.Storage = new function () {
var memmgr = Components.classes["@mozilla.org/memory-reporter-manager;1"]
.getService(Components.interfaces.nsIMemoryReporterManager);
memmgr.init();
- Zotero.debug("Memory usage: " + memmgr.resident);
+ //Zotero.debug("Memory usage: " + memmgr.resident);
if (libraryID !== false) {
if (itemIDs) {
@@ -819,11 +819,11 @@ Zotero.Sync.Storage = new function () {
// Spin the event loop during synchronous file access
yield Q.delay(1);
- Zotero.debug("Memory usage: " + memmgr.resident);
+ //Zotero.debug("Memory usage: " + memmgr.resident);
let row = attachmentData[item.id];
let lk = item.libraryID + "/" + item.key;
- Zotero.debug("Checking attachment file for item " + lk);
+ //Zotero.debug("Checking attachment file for item " + lk);
var file = item.getFile(row);
if (!file) {
@@ -935,12 +935,12 @@ Zotero.Sync.Storage = new function () {
let checkItems = function () {
if (!items.length) return;
- Zotero.debug("Memory usage: " + memmgr.resident);
+ //Zotero.debug("Memory usage: " + memmgr.resident);
let item = items.shift();
let row = attachmentData[item.id];
let lk = item.libraryKey;
- Zotero.debug("Checking attachment file for item " + lk);
+ //Zotero.debug("Checking attachment file for item " + lk);
let nsIFile = item.getFile(row, true);
let file = null;
@@ -949,10 +949,10 @@ Zotero.Sync.Storage = new function () {
file = promisedFile;
return file.stat()
.then(function (info) {
- Zotero.debug("Memory usage: " + memmgr.resident);
+ //Zotero.debug("Memory usage: " + memmgr.resident);
var fmtime = info.lastModificationDate.getTime();
- Zotero.debug("File modification time for item " + lk + " is " + fmtime);
+ //Zotero.debug("File modification time for item " + lk + " is " + fmtime);
if (fmtime < 1) {
Zotero.debug("File mod time " + fmtime + " is less than 1 -- interpreting as 1", 2);
@@ -1038,7 +1038,7 @@ Zotero.Sync.Storage = new function () {
})
.finally(function () {
if (file) {
- Zotero.debug("Closing file for item " + lk);
+ //Zotero.debug("Closing file for item " + lk);
file.close();
}
})