Mercurial > hg
diff hgext/show.py @ 41153:2c3f69855ce8
manifest: convert a recursive function to iterative one using stacks
I am debugging a memory issue from yesterday where `hg update` goes upto taking
22GB of memory on our internal treemanifest repository. This is an interesting
function and I saw memory consumption increasing while this function was
running.
It's sometimes hard to understand a recursive function and also the profile
won't show you actual operations which took time, rather it will show you the
function again and again in profile.
I am yet to notice any memory consumption decrease with this patch, but I
believe this will help like in making this a generator.
Differential Revision: https://phab.mercurial-scm.org/D5413
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Wed, 12 Dec 2018 16:26:58 +0300 |
parents | c303d65d2e34 |
children | 566daffc607d |