Change in ovirt-engine[master]: core: getEligibleVolumes performance

amureini at redhat.com amureini at redhat.com
Mon Nov 30 10:18:15 UTC 2015


Allon Mureinik has submitted this change and it was merged.

Change subject: core: getEligibleVolumes performance
......................................................................


core: getEligibleVolumes performance

getEligibleVolumes traverses a list of GlusterVolumeEntitys and
filters it by a different predicate in each pass, resulting in a list
of GlusterVolumeEntitys that pass all the predicates.

This patch improves this method's performance by unifying all the
predicates to a single predicate using Predicate::and and then uses it
to filter the list. This change offers a slight performance
improvement as it saves the need to collect the results into a
different list each iteration.

Change-Id: I18b691366e4588263dcb99fe18d644f751458e69
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterGeoReplicationEligibleVolumesQuery.java
1 file changed, 2 insertions(+), 4 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18b691366e4588263dcb99fe18d644f751458e69
Gerrit-PatchSet: 3
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: Sahina Bose <sabose at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: anmolbabu <anbabu at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list