All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Anders Melchiorsen <mail@cup.kalibalik.dk>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Use line buffering for standard output
Date: Sun, 3 Aug 2008 14:46:18 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0808031444270.3668@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1217798768-18021-1-git-send-email-mail@cup.kalibalik.dk>



On Sun, 3 Aug 2008, Anders Melchiorsen wrote:
>
> Normally, stdout is fully buffered, unless it refers to a terminal
> device. This gives problems when fork() is in play: the buffer is
> cloned and output appears twice.
> 
> By always setting stdout to line buffering, we make the output work
> identically for all output devices.

Please don't.

This is a huge peformance issue for things like

	git log -p > file

where we really want it to be fully buffered.

So please just find the place where we do a fork() without flushing 
pending output...

(We really shouldn't have all that many "fork()" calls left, I thought - 
the Windows stuff means that most of it should be abstracted away. So it's 
not like we're talking about hundreds of sites, there should be just a 
couple).

		Linus

  parent reply	other threads:[~2008-08-03 21:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-03 21:26 [PATCH] Use line buffering for standard output Anders Melchiorsen
2008-08-03 21:38 ` Junio C Hamano
2008-08-03 21:46 ` Linus Torvalds [this message]
2008-08-03 22:48   ` Anders Melchiorsen
2008-08-04  0:24     ` Junio C Hamano
2008-08-04  0:30       ` [PATCH] Flush output in start_async Anders Melchiorsen
2008-08-04  5:50       ` [PATCH] Use line buffering for standard output Linus Torvalds
2008-08-04 10:18         ` [PATCH] Add output flushing before fork() Anders Melchiorsen

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=alpine.LFD.1.10.0808031444270.3668@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mail@cup.kalibalik.dk \
    /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.