Change in ovirt-engine[master]: webadmin: Reimplement DataCenterGuideModel#updateOptionsNonL...
Code Review
gerrit at ovirt.org
Thu Apr 6 19:05:14 UTC 2017
>From Allon Mureinik <amureini at 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 at 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 at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list