All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH 1/2] index-pack: smarter memory usage when resolving deltas
Date: Mon, 12 Apr 2010 08:30:33 +0200	[thread overview]
Message-ID: <4BC2BE09.7060809@viscovery.net> (raw)
In-Reply-To: <1271041047-32563-1-git-send-email-nico@fluxnic.net>

Am 4/12/2010 4:57, schrieb Nicolas Pitre:
> --- a/builtin/index-pack.c
> +++ b/builtin/index-pack.c
> @@ -359,34 +359,33 @@ static void *get_data_from_pack(struct object_entry *obj)
>  {
>  	off_t from = obj[0].idx.offset + obj[0].hdr_size;
>  	unsigned long len = obj[1].idx.offset - from;
> -	unsigned long rdy = 0;
> -	unsigned char *src, *data;
> +	unsigned char *data, inbuf[4096];

With this tiny buffer we make way more pread() calls than we used to,
right? This hurts emulated pread(), where we do at least 4 syscalls per
pread(). Shouldn't the buffer be much larger, like min(len,16*4096)?

-- Hannes

  parent reply	other threads:[~2010-04-12  6:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12  2:57 [PATCH 1/2] index-pack: smarter memory usage when resolving deltas Nicolas Pitre
2010-04-12  2:57 ` [PATCH 2/2] index-pack: rationalize unpack_entry_data() Nicolas Pitre
2010-04-12  6:36   ` Johannes Sixt
2010-04-12 15:47     ` Nicolas Pitre
2010-04-12  6:30 ` Johannes Sixt [this message]
2010-04-12 15:45   ` [PATCH 1/2] index-pack: smarter memory usage when resolving deltas Nicolas Pitre

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=4BC2BE09.7060809@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@fluxnic.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.