commit 4f6491d6ad46ce310d495f26194d050874104267 parent 7edfd0aa03432d59b5c2a73f2200c8d3ec4b5247 Author: Dan Stillman <dstillman@zotero.org> Date: Wed, 4 Mar 2009 06:00:22 +0000 Speed up sync XML generation by a factor of a lot Diffstat:
| M | chrome/content/zotero/xpcom/sync.js | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -2274,15 +2274,19 @@ Zotero.Sync.Server.Data = new function() { // so we handle them differently case 'item': var objs = Zotero[Types].get(ids.updated[types]); + xml.items = <items/>; for each(var obj in objs) { - xml[types][type] += this[type + 'ToXML'](obj, syncSession); + //xml[types][type] += this[type + 'ToXML'](obj, syncSession); + xml[types].appendChild(this[type + 'ToXML'](obj, syncSession)); } break; default: + xml[types] = new XML("<" + types + "/>"); for each(var id in ids.updated[types]) { var obj = Zotero[Types].get(id); - xml[types][type] += this[type + 'ToXML'](obj); + //xml[types][type] += this[type + 'ToXML'](obj); + xml[types].appendChild(this[type + 'ToXML'](obj)); } } }