summaryrefslogtreecommitdiff
path: root/perl/Git/SVN.pm
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-10-24 22:53:52 (GMT)
committerEric Wong <normalperson@yhbt.net>2014-10-24 22:56:06 (GMT)
commitdfa72fdb96befbd790f623bb2909a347176753c2 (patch)
tree38ece2a37a3d7b8c1813bda7a13f680564023f5b /perl/Git/SVN.pm
parentf947ae4b655b5354ca2a7c2456e04d6567921160 (diff)
downloadgit-dfa72fdb96befbd790f623bb2909a347176753c2.zip
git-dfa72fdb96befbd790f623bb2909a347176753c2.tar.gz
git-dfa72fdb96befbd790f623bb2909a347176753c2.tar.bz2
git-svn: reload RA every log-window-size
Despite attempting to use local memory pools everywhere we can, (including our call to SVN::Ra::do_update and all subsequent reporter calls), there does not appear to be a way to force the Git::SVN::Fetcher callbacks to use a pool other than the per-SVN::Ra pool. Git::SVN::Fetcher ends up using the main RA pool which grows monotonically in size for the lifetime of the RA object. Thus the only way to free that memory appears to be to destroy and recreate the RA connection for at every --log-window-size interval. This reduces memory usage over the course of fetching 10K revisions using a test repository created with the script at the end of this commit message. As reported by time(1) on my x86-64 system: before: 54024k after: 28680k Unfortunately, there remains some yet-to-be-tracked-down slow memory growth which would be evident as the `nr' parameter increases in the repository generation script: -----------------------------8<------------------------------ set -e tmp=$(mktemp -d svntestrepo-XXXXXXXX) svnadmin create "$tmp" repo=file://"$(cd $tmp && pwd)" svn co "$repo" "$tmp/wd" cd "$tmp/wd" if ! test -f a then > a svn add a svn commit -m 'A' fi nr=10000 while test $nr -gt 0 do echo $nr > a svn commit -q -m A nr=$((nr - 1)) done echo "repository created in $repo" -----------------------------8<------------------------------ Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'perl/Git/SVN.pm')
0 files changed, 0 insertions, 0 deletions