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 <[email protected]>
---
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 <[email protected]>
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to