
From Alona Kaplan <alkaplan@redhat.com>:
Alona Kaplan has submitted this change and it was merged. ( https://gerrit.ovirt.org/78191 ) Change subject: core: simplified parameters passed to VmInterfaceManager#add ...................................................................... core: simplified parameters passed to VmInterfaceManager#add whole complexity in this class was caused by allocating all macs in advance, setting them in nics, and then passing clue to `add` method, how it should handle macAddress property of VmNic class. This is poor design (feature envy, passing flags, …), and while it has some performance benefits, those are minuscule. Getting all MACs at once will improve several locks acquisitions, but a) this is what we totally ignore in different flows b) IIUC number of MACs per VM will be rarely higher number than 10. Therefore I'd opt for easy code, which is 1μs slower (at most). Bug-Url: https://bugzilla.redhat.com/1435485 Change-Id: I0317a887cb26e8eddb89e3a543768fdb5315ef34 Signed-off-by: Martin Mucha <mmucha@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/exportimport/ImportVmCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/VmInterfaceManager.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/VmInterfaceManagerTest.java 4 files changed, 22 insertions(+), 53 deletions(-) Approvals: Martin Mucha: Verified Alona Kaplan: Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/78191 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0317a887cb26e8eddb89e3a543768fdb5315ef34 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkaplan@redhat.com> Gerrit-Reviewer: Dominik Holler <dholler@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>