Change in vdsm[master]: Apply memoized to getos()

danken at redhat.com danken at redhat.com
Fri Sep 28 09:35:04 UTC 2012


Dan Kenigsberg has submitted this change and it was merged.

Change subject: Apply memoized to getos()
......................................................................


Apply memoized to getos()

getos() is called by _getKeyPackages() every time the capabilies
are queried. For the case of RHEL system, it has to call
os.path.exists() four times to get the OS name.  So it's worth to
memory it by the decorator memoized. And it will not change while
vdsm is running, so it's safe to be cached.

Change-Id: Id878b558ff646334939137d23fb05bd065e0e9d6
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M vdsm/caps.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Mark Wu: Verified
  Dan Kenigsberg: Looks good to me, approved


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id878b558ff646334939137d23fb05bd065e0e9d6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list