[pve-devel] [PATCH manager] PendingObjectGrid hasPendingChanges optimization
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Jan 27 12:08:50 CET 2016
Break out of Ext.Array.each early by returning false when
we found a pending change.
---
www/manager/grid/PendingObjectGrid.js | 1 +
www/manager6/grid/PendingObjectGrid.js | 1 +
2 files changed, 2 insertions(+)
diff --git a/www/manager/grid/PendingObjectGrid.js b/www/manager/grid/PendingObjectGrid.js
index 051951a..546afd3 100644
--- a/www/manager/grid/PendingObjectGrid.js
+++ b/www/manager/grid/PendingObjectGrid.js
@@ -29,6 +29,7 @@ Ext.define('PVE.grid.PendingObjectGrid', {
var rec = me.store.getById(k);
if (rec && rec.data && Ext.isDefined(rec.data.pending) && (rec.data.pending !== '')) {
pending = true;
+ return false; // break
}
});
diff --git a/www/manager6/grid/PendingObjectGrid.js b/www/manager6/grid/PendingObjectGrid.js
index 051951a..546afd3 100644
--- a/www/manager6/grid/PendingObjectGrid.js
+++ b/www/manager6/grid/PendingObjectGrid.js
@@ -29,6 +29,7 @@ Ext.define('PVE.grid.PendingObjectGrid', {
var rec = me.store.getById(k);
if (rec && rec.data && Ext.isDefined(rec.data.pending) && (rec.data.pending !== '')) {
pending = true;
+ return false; // break
}
});
--
2.1.4
More information about the pve-devel
mailing list