From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Reimplement DataCenterGuideModel#updateOptionsNonLocalFS
......................................................................
webadmin: Reimplement DataCenterGuideModel#updateOptionsNonLocalFS
This patch reimplments DataCenterGuideModel#updateOptionsNonLocalFS
with Java 8 streams instead of the for loop it used to iterate the
hosts.
Besides producing more elegant code, this reimplementation also
improves performance by extracting the cluster IDs to a Set before
attempting to match them to hosts. Thus, for a system with N hosts
and M clusters, this operation is reduced to an O(N) operation
instead of an O(M*N) operation.
The Linq#isClusterItemExistInList method, which is no longer needed
after this rewrite, is thus removed.
Change-Id: If438f9b4327cee8df3596ddb7ac338f4ef9ea25f
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
2 files changed, 11 insertions(+), 24 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit
https://gerrit.ovirt.org/75173
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If438f9b4327cee8df3596ddb7ac338f4ef9ea25f
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>