Change in vdsm[master]: vmDevices: add __slots__ to devices

nsoffer at redhat.com nsoffer at redhat.com
Thu Jan 30 07:26:29 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: vmDevices: add __slots__ to devices
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/21036/4//COMMIT_MSG
Commit Message:

Line 7: vmDevices: add __slots__ to devices
Line 8: 
Line 9: VDSM devices are created using setattr over **kwargs, making the
Line 10: initialization implicit. Implementing __slots__ does define which
Line 11: attributes does the device accept and also improves memory footprint.
Considering the number of vms (100?), and the number of devices per vm 20?), we are talking about 1000s of objects. If we assume that you save 100 bytes per object, we are talking about 100's of KB of memory, which is not interesting.

The real value in this patch is making this code more understandable and robust, fixing hidden bugs caused by the careless way objects are initialized.
Line 12: 
Line 13: Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6e8dadabdd02d3b44606f215c4bc7b7e306a591a
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list