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 <amureini(a)redhat.com>
---
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 <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhornyak(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server