commit 03023e626532a2a0c88e2f62a9bae81f232ffd33
parent ad965b1675d7154054c5ae6b84d2aacd3e5f1383
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 10 Jun 2009 07:55:16 +0000
Speed up initial items pane load (tested at ~20% faster with 5400 items)
Diffstat:
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
@@ -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);