Allon Mureinik has submitted this change and it was merged.

Change subject: core: Don't clone Guids in VDS.clone()
......................................................................


core: Don't clone Guids in VDS.clone()

Since Guids are immutable, there is no need for VDS.clone() to create
new Guid instances, especially not by the expensive string-parsing
method.

This patch changes the new instance created by VDS.clone() to simply
hold references to the old one's Guid, thus improving performance.
As a nice side bonus, this will allow cloning of VDS instances that have
null VDS group or storage pool IDs.

This patch also contains a test to assert this functionality.

Change-Id: I0f7130f76525dda601ac0bc7322fbf96c961c5a6
Signed-off-by: Allon Mureinik <[email protected]>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VDS.java
A 
backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/VDSTest.java
2 files changed, 39 insertions(+), 2 deletions(-)

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


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f7130f76525dda601ac0bc7322fbf96c961c5a6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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