# HG changeset patch # User Joerg Sonnenberger # Date 1601941916 -7200 # Node ID 44d84b726c8ace861c693ba6d57c91a796fe726e # Parent 232c88dd89e3a42613c5fe13030bcdf83750a520 unbundle: free temporary objects after use This reduces peak RSS for larger unbundle operations by ~30 Bytes per changeset on AMD64. This can't be a direct delete for Python 2.7, so reset the object instead and leave a comment. The efilesset object can't be deleted as it is referenced by the local onchangelog function and Python 2.7 rejects a delete on the existance of a nested scope. Differential Revision: https://phab.mercurial-scm.org/D9153 diff -r 232c88dd89e3 -r 44d84b726c8a mercurial/changegroup.py --- a/mercurial/changegroup.py Tue Oct 13 03:23:17 2020 +0200 +++ b/mercurial/changegroup.py Tue Oct 06 01:51:56 2020 +0200 @@ -333,6 +333,10 @@ clend = len(cl) changesets = clend - clstart progress.complete() + del deltas + # TODO Python 2.7 removal + # del efilesset + efilesset = None self.callback = None # pull off the manifest group