Patchwork D9153: unbundle: free temporary objects after use

login
register
mail settings
Submitter phabricator
Date Oct. 5, 2020, 11:52 p.m.
Message ID <differential-rev-PHID-DREV-qk4fphplf5mho3lx2gfg-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47382/
State Superseded
Headers show

Comments

phabricator - Oct. 5, 2020, 11:52 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This reduces peak RSS for larger unbundle operations by ~30 Bytes per
  changeset on AMD64.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D9153

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -331,6 +331,8 @@ 
             clend = len(cl)
             changesets = clend - clstart
             progress.complete()
+            del deltas
+            del efilesset
             self.callback = None
 
             # pull off the manifest group