mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Add some debugging for a memory usage issue during file syncing
This commit is contained in:
parent
375f0774c0
commit
8c6a9bfbf0
1 changed files with 8 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue