Change in vdsm[master]: fileSD: Optimize getAllVolumes on file storage
nsoffer at redhat.com
nsoffer at redhat.com
Wed Jan 7 13:37:08 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: fileSD: Optimize getAllVolumes on file storage
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.ovirt.org/#/c/36593/1/tests/fileSDTests.py
File tests/fileSDTests.py:
Line 151: res = dom.getAllVolumes()
Line 152: elapsed = time.time() - start
Line 153: print "%f seconds" % elapsed
Line 154:
Line 155: # This takes 0.065 seconds on my laptop, 1 second should be enough even
> commit message says ten times as much. who is right?
This is the correct number.
Line 156: # on overloaded jenkins slave.
http://gerrit.ovirt.org/#/c/36593/1/vdsm/storage/fileSD.py
File vdsm/storage/fileSD.py:
Line 418: sd.DOMAIN_IMAGES, "*", "*.meta")
Line 419: volMetaPaths = self.oop.glob.glob(volMetaPattern)
Line 420:
Line 421: # First create mapping from images to volumes
Line 422: images = collections.defaultdict(list)
> using "set" here, instead of list, is conceptually better, as the order of
I'm using a list since we do not need the additional capabilities of a set, so we should not pay for them (more memory, slower creation).
This is also temporary throwaway collection so the semantics are not important.
Line 423: for metaPath in volMetaPaths:
Line 424: head, tail = os.path.split(metaPath)
Line 425: volUUID, volExt = os.path.splitext(tail)
Line 426: imgUUID = os.path.basename(head)
--
To view, visit http://gerrit.ovirt.org/36593
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc19ce272b7e0b9c91d2f90aa46b5ddd21d69ece
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list