From 03023e626532a2a0c88e2f62a9bae81f232ffd33 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 10 Jun 2009 07:55:16 +0000 Subject: [PATCH] Speed up initial items pane load (tested at ~20% faster with 5400 items) --- chrome/content/zotero/xpcom/data/items.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js index 7ce154ecd..a05adaca5 100644 --- a/chrome/content/zotero/xpcom/data/items.js +++ b/chrome/content/zotero/xpcom/data/items.js @@ -46,13 +46,7 @@ Zotero.Items = new function() { ['firstCreator', 'numNotes', 'numAttachments'] ); } - - // Make a copy of array - var fields = []; - for each(var field in _primaryFields) { - fields.push(field); - } - return fields; + return _primaryFields; }); this.__defineGetter__('linkedItemPredicate', function () "owl:sameAs"); @@ -605,7 +599,6 @@ Zotero.Items = new function() { } var itemsRows = Zotero.DB.query(sql); var itemIDs = []; - for each(var row in itemsRows) { var itemID = row.itemID; itemIDs.push(itemID);