<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/perl, branch v2.2.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.2.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.2.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-10-31T10:34:54Z</updated>
<entry>
<title>git-svn: use SVN::Ra::get_dir2 when possible</title>
<updated>2014-10-31T10:34:54Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-31T10:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7ffa35b0479dac547659f06b8a6ea7d31c57cc05'/>
<id>urn:sha1:7ffa35b0479dac547659f06b8a6ea7d31c57cc05</id>
<content type='text'>
This avoids the following failure with normal "get_dir" on newer
versions of SVN (tested with SVN 1.8.8-1ubuntu3.1):

  Incorrect parameters given: Could not convert '%ld' into a number

get_dir2 also has the potential to be more efficient by requesting
less data.

ref: &lt;1414636504.45506.YahooMailBasic@web172304.mail.ir2.yahoo.com&gt;
ref: &lt;1414722617.89476.YahooMailBasic@web172305.mail.ir2.yahoo.com&gt;

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Cc: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
</content>
</entry>
<entry>
<title>git-svn: add space after "W:" prefix in warning</title>
<updated>2014-10-30T08:31:28Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-30T08:31:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=da0bc948ac2e01652a150fd4a57cebad6143242c'/>
<id>urn:sha1:da0bc948ac2e01652a150fd4a57cebad6143242c</id>
<content type='text'>
And minor reformatting while we're in the area.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: (cleanup) remove editor param passing</title>
<updated>2014-10-30T08:29:43Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-29T20:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ae9a7b966e61d25605b575163964f8375e37c9a'/>
<id>urn:sha1:4ae9a7b966e61d25605b575163964f8375e37c9a</id>
<content type='text'>
Neither find_extra_svk_parents or find_extra_svn_parents ever
used the `$ed' parameter.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: prepare SVN::Ra config pieces once</title>
<updated>2014-10-29T19:59:25Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-29T19:55:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=835e3ddeff2ae75b1fe71388686d44c536f2ed55'/>
<id>urn:sha1:835e3ddeff2ae75b1fe71388686d44c536f2ed55</id>
<content type='text'>
Memoizing these initialization functions saves some memory for
long fetches which require scanning many unwanted revisions
before any wanted revisions happen.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>Git.pm: add specified name to tempfile template</title>
<updated>2014-10-29T19:59:23Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-29T19:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=822aaf0f0865299d6cd3a6866e8047638e3f898c'/>
<id>urn:sha1:822aaf0f0865299d6cd3a6866e8047638e3f898c</id>
<content type='text'>
This should help me track down errors in git-svn more easily:

	write .git/Git_XXXXXX: Bad file descriptor
	 at /usr/lib/perl5/SVN/Ra.pm line 623

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: disable _rev_list memoization</title>
<updated>2014-10-27T01:39:39Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-27T01:39:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7676aff70973e617c3f58a8633db6d0e3ee99e45'/>
<id>urn:sha1:7676aff70973e617c3f58a8633db6d0e3ee99e45</id>
<content type='text'>
This memoization appears unneeded as the check_cherry_pick2 cache is
in front of it does enough.

With this change applied, importing from local svn+ssh and http copies
of the R repo[1] takes only 2:00 (2 hours) on my system and the git-svn
process never uses more than 60MB RSS on my x86-64 GNU/Linux system[2].
This 60M measurement is only for the git-svn Perl process itself and
does not include memory used by git subprocesses accessing large packs
(subprocess memory usage _is_ measured by my time(1) tool).

Before this change, an import took longer (2:20) on svn+ssh:// but
git-svn used around 240MB during the imports.  Worse yet, git-svn
ballooned to over 400M when writing out the cache to the filesystem.

I also tried removing memoization for `has_no_changes', too, but a
local copy of the R repository(*) was not close to finishing within
10 hours on my system.

[1] http://svn.r-project.org/R
[2] file:// repos causes libsvn to use more memory internally

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
Cc: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
</content>
</entry>
<entry>
<title>git-svn: save a little memory as fetch progresses</title>
<updated>2014-10-25T07:56:33Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-25T07:56:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aee7d04c126b48a9871309ec65cecf88781b1d32'/>
<id>urn:sha1:aee7d04c126b48a9871309ec65cecf88781b1d32</id>
<content type='text'>
There is no reason to keep entries in the %revs hash after we're
done processing a revision, so allow entries become freed as
processing continues.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: remove unnecessary DESTROY override</title>
<updated>2014-10-25T07:56:28Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-25T07:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6725ecaba7af16c69591e5a180acbc521e2bba63'/>
<id>urn:sha1:6725ecaba7af16c69591e5a180acbc521e2bba63</id>
<content type='text'>
This override was probably never necessary, but most likely a no-op
as it does not appear to do anything in SVN::Ra itself.

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: reload RA every log-window-size</title>
<updated>2014-10-24T22:56:06Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-24T22:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dfa72fdb96befbd790f623bb2909a347176753c2'/>
<id>urn:sha1:dfa72fdb96befbd790f623bb2909a347176753c2</id>
<content type='text'>
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&lt;------------------------------
set -e
tmp=$(mktemp -d svntestrepo-XXXXXXXX)
svnadmin create "$tmp"
repo=file://"$(cd $tmp &amp;&amp; pwd)"
svn co "$repo" "$tmp/wd"
cd "$tmp/wd"
if ! test -f a
then
	&gt; a
	svn add a
	svn commit -m 'A'
fi

nr=10000
while test $nr -gt 0
do
	echo $nr &gt; a
	svn commit -q -m A
	nr=$((nr - 1))
done
echo "repository created in $repo"
-----------------------------8&lt;------------------------------

Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
<entry>
<title>git-svn: remove mergeinfo rev caching</title>
<updated>2014-10-24T22:55:43Z</updated>
<author>
<name>Eric Wong</name>
<email>normalperson@yhbt.net</email>
</author>
<published>2014-10-21T06:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b6c613f1a873555475050bd8f5a22828f0d03a3'/>
<id>urn:sha1:2b6c613f1a873555475050bd8f5a22828f0d03a3</id>
<content type='text'>
This should further reduce memory usage from the new mergeinfo
speedups without hurting performance too much, assuming
reasonable latency to the SVN server.

Cc: Hin-Tak Leung &lt;htl10@users.sourceforge.net&gt;
Suggested-by: Jakob Stoklund Olesen &lt;stoklund@2pi.dk&gt;
Signed-off-by: Eric Wong &lt;normalperson@yhbt.net&gt;
</content>
</entry>
</feed>
