public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Johannes Sixt <j6t@kdbg•org>, Git Mailing List <git@vger•kernel.org>
Subject: Re: [PATCH] t1050-large: replace dd by test-genrandom
Date: Tue, 13 Jan 2015 15:40:10 -0800	[thread overview]
Message-ID: <xmqq4mruckrp.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150113223849.GA3144@peff.net> (Jeff King's message of "Tue, 13 Jan 2015 17:38:50 -0500")

Jeff King <peff@peff•net> writes:

> On Tue, Jan 13, 2015 at 11:33:08PM +0100, Johannes Sixt wrote:
>
>> BTW, is it the incompressibility where the time is lost or lack of
>> sparseness of the files? How does the timing change with this patch on
>> top?
>
> Oh, good call. It's the incompressibility. Which makes perfect sense.
>
> Once we copy the file into the object database, that copy is not sparse.
> But in the genrandom version, it _is_ a million times bigger. :)

Yeah, of course ;-)

> With the patch below, my timings go back to ~0.7s (actually, they seem
> slightly _better_ on average than what is in "master" now, but there is
> quite a bit of run-to-run noise, so it may not be meaningful).
>
>> diff --git a/t/t1050-large.sh b/t/t1050-large.sh
>> index f653121..9cf4e0e 100755
>> --- a/t/t1050-large.sh
>> +++ b/t/t1050-large.sh
>> @@ -9,10 +9,10 @@ test_expect_success setup '
>>  	# clone does not allow us to pass core.bigfilethreshold to
>>  	# new repos, so set core.bigfilethreshold globally
>>  	git config --global core.bigfilethreshold 200k &&
>> -	test-genrandom seed1 2000000 >large1 &&
>> +	printf "\0%2000000s" X >large1 &&
>>  	cp large1 large2 &&
>>  	cp large1 large3 &&
>> -	test-genrandom seed2 2500000 >huge &&
>> +	printf "\0%2500000s" Y >huge &&
>>  	GIT_ALLOC_LIMIT=1500k &&
>>  	export GIT_ALLOC_LIMIT
>>  '
>
> I think with this squashed in, I have no complaints at all about your
> patch.

OK, perhaps that affects the log message, so I'd play lazy and wait
for a reroll.

Are we depending on the binary-ness of these test files by the way?
The leading NUL \0 looked a bit strange to me.

  reply	other threads:[~2015-01-13 23:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 17:36 [PATCH] t1050-large: replace dd by test-genrandom Johannes Sixt
2015-01-13 18:56 ` Junio C Hamano
2015-01-13 19:55   ` Johannes Sixt
2015-01-13 21:47 ` Jeff King
2015-01-13 22:33   ` Johannes Sixt
2015-01-13 22:38     ` Jeff King
2015-01-13 23:40       ` Junio C Hamano [this message]
2015-01-14 11:27         ` Jeff King
2015-01-14 17:31           ` Junio C Hamano
2015-01-14 20:28           ` [PATCH v2] t1050-large: generate large files without dd Johannes Sixt
2015-01-14 21:00             ` Jeff King
2015-01-14 21:17               ` Johannes Sixt
2015-01-14 21:59               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4mruckrp.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=j6t@kdbg$(echo .)org \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox