Change in ovirt-engine[master]: core: Improve performance of GUID constructor

amureini at redhat.com amureini at redhat.com
Sun Jul 7 15:36:15 UTC 2013


Allon Mureinik has submitted this change and it was merged.

Change subject: core: Improve performance of GUID constructor
......................................................................


core: Improve performance of GUID constructor

The GUID constructor that takes an array of bytes as parameter creates
an intermediate string representation that is then immediately
discarded. This patch changes the constructor to build the GUID without
the intermediate string, borrowing the algorithm from a private
constructor of the UUID class. In my environment this reduces the time
to run the constructor from approx 1500ns to approx 75ns. It should also
have a positive effect in garbage collection, as it doesn't generate the
intermediate string. The overall effect in performance is probably not
that big, but every bit helps.

Change-Id: Ia76c3d9e7ee7594d6d925551320635a20399f11f
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/compat/src/main/java/org/ovirt/engine/core/compat/Guid.java
1 file changed, 25 insertions(+), 60 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia76c3d9e7ee7594d6d925551320635a20399f11f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Liran Zelkha <liran.zelkha at gmail.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list