Change in ovirt-engine[master]: webadmin: DataCentersStorageListModel#attachInternal

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: DataCentersStorageListModel#attachInternal
......................................................................


webadmin: DataCentersStorageListModel#attachInternal

This patch offers a slight performance improvement in the
attachInternal method.
While the logic of checking if a domain is unattached or present in a
list was not changed, the order of the evaluations was flipped so
that the O(1) is performed before the O(n) operation. If the domain
is unattached, the potentially heavy O(n) check can be short
circuited away.

Change-Id: I15d7e99017b944e322dc7ad6458acf07aa46d514
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Verified
  Idan Shaby: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/75170
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I15d7e99017b944e322dc7ad6458acf07aa46d514
Gerrit-PatchSet: 5
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: Idan Shaby <ishaby 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