www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 8c6a9bfbf08009801b545f9604ddf719c11b991b
parent 375f0774c0cfc201b5569f2900818da1d24429a3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 17 Jul 2013 18:03:00 -0400

Add some debugging for a memory usage issue during file syncing

Diffstat:
Mchrome/content/zotero/xpcom/storage.js | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -656,6 +656,11 @@ Zotero.Sync.Storage = new function () { this.checkForUpdatedFiles = function (itemModTimes, libraryID) { var msg = "Checking for locally changed attachment files"; + var memmgr = Components.classes["@mozilla.org/memory-reporter-manager;1"] + .getService(Components.interfaces.nsIMemoryReporterManager); + memmgr.init(); + Zotero.debug("Memory usage: " + memmgr.resident); + if (typeof libraryID != 'undefined') { msg += " in library " + libraryID; if (itemModTimes) { @@ -740,8 +745,10 @@ Zotero.Sync.Storage = new function () { var updatedStates = {}; var items = Zotero.Items.get(itemIDs); for each(var item in items) { + Zotero.debug("Memory usage: " + memmgr.resident); + var lk = libraryID + "/" + item.key; - //Zotero.debug("Checking attachment file for item " + lk); + Zotero.debug("Checking attachment file for item " + lk); var file = item.getFile(attachmentData[item.id]); if (!file) { Zotero.debug("Marking attachment " + lk + " as missing");