commit 2f0391fb9ca3eeda7563a890f479a249f736a4af
parent a1bd2bace5913d05ac6b832da3cbd07b5dc642d4
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 5 May 2017 01:05:48 -0400
Clean up some comments and debug lines
Diffstat:
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js
@@ -498,15 +498,13 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
var conflicts = [];
var num = 0;
- // Process batches when they're available, one at a time
+ // Process batches of object data as they're available, one at a time
yield Zotero.Promise.map(
json,
Zotero.Promise.coroutine(function* (batch) {
this._failedCheck();
- Zotero.debug(`Processing batch of downloaded ${objectTypePlural} in `
- + this.library.name);
-
+ Zotero.debug(`Processing batch of downloaded ${objectTypePlural} in ${this.library.name}`);
if (!Array.isArray(batch)) {
this.failed = batch;
@@ -527,7 +525,8 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
onObjectProcessed: () => {
num++;
},
- // Increase the notifier batch size as we go
+ // Increase the notifier batch size as we go, so that new items start coming in
+ // one by one but then switch to larger chunks
getNotifierBatchSize: () => {
var size;
if (num < 10) {
@@ -603,8 +602,7 @@ Zotero.Sync.Data.Engine.prototype._downloadObjects = Zotero.Promise.coroutine(fu
}
}
else {
- Zotero.debug("All " + objectTypePlural + " for "
- + this.library.name + " saved to database");
+ Zotero.debug(`All ${objectTypePlural} for ${this.library.name} saved to database`);
if (objectType == 'item') {
this.failedItems = [];