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

masayag at redhat.com masayag at redhat.com
Wed May 14 11:15:02 UTC 2014


Moti Asayag has submitted this change and it was merged.

Change subject: core: performance improvement
......................................................................


core: performance improvement

* initialized ArrayList to avoid copying arrays (tradeof is
bigger memory footprint during initialization)

* changed transforming macAddress stored in 'long' to
String; loop is used instead of regex.

---
this changes cuts CPU time approx to 50% of original.
---
Note: code can be suboptimal when looking for LOT OF macs but range
offers to little of them: in that case unneccesarily big
array alocated and then trown away for no reason. But this should
not be an issue.

Change-Id: I09f87ebd1ea17d09a974ce6ca3e26bd2454a72fc
Bug-Url: https://bugzilla.redhat.com/1063064
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/MacAddressRangeUtils.java
A backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/MacAddressRangeUtilsTest.java
2 files changed, 39 insertions(+), 3 deletions(-)

Approvals:
  Mike Kolesnik: Looks good to me, approved
  Martin Mucha: Verified



-- 
To view, visit http://gerrit.ovirt.org/25940
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I09f87ebd1ea17d09a974ce6ca3e26bd2454a72fc
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkolesni at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list