diff options
author | Eric Wong <normalperson@yhbt.net> | 2014-10-24 22:53:52 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2014-10-24 22:56:06 +0000 |
commit | dfa72fdb96befbd790f623bb2909a347176753c2 (patch) | |
tree | 38ece2a37a3d7b8c1813bda7a13f680564023f5b /builtin/merge-index.c | |
parent | git-svn.txt: advertise pushurl with dcommit (diff) | |
download | tgif-dfa72fdb96befbd790f623bb2909a347176753c2.tar.xz |
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 'builtin/merge-index.c')
0 files changed, 0 insertions, 0 deletions