Change in vdsm[master]: Return deep copy from GuestAgent.getGuestInfo()

mzamazal at redhat.com mzamazal at redhat.com
Fri Jan 22 09:26:55 UTC 2016


Milan Zamazal has posted comments on this change.

Change subject: Return deep copy from GuestAgent.getGuestInfo()
......................................................................


Patch Set 2: Verified+1

Verified by running tests.

I also checked performance with a rather large list in getGuestInfo():

  g = copy.deepcopy(self.guestInfo)
  g['fooList'] = tuple([str(random.randint(1000000, 9000000)) for i in range(5000)])
  t = time.time()
  for i in range(1000):
      utils.picklecopy(g)
  self.log.debug('picklecopy:%s', time.time() - t)

It typically takes 0,4-0,5 ms on my computer per one picklecopy() call.  With just 1000 strings it's over 0,1 ms per call.  (Shallow copying is instant in both cases.)  Of course, real conditions may differ and I'm not sure how much impact this can have but it doesn't look horrible to me.

-- 
To view, visit https://gerrit.ovirt.org/52499
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c50568604a3b4bdab57ec175687ac4e3a9565b9
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: No


More information about the vdsm-patches mailing list