All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
Cc: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: Windows support
Date: Thu, 26 Jul 2007 20:13:32 +0200	[thread overview]
Message-ID: <8564478243.fsf@lola.goethe.zz> (raw)
In-Reply-To: <fcaeb9bf0707260911y4091b525kc6b89beb82ec7dc7@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Thu\, 26 Jul 2007 12\:11\:20 -0400")

"Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:

> On 7/26/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
>> Hi,
>>
>> On Thu, 26 Jul 2007, Nguyen Thai Ngoc Duy wrote:
>>
>> > I make MinGW busybox part of git for some reasons:
>> >
>> > - Making a full MinGW busybox would take lots of time. I don't need
>> > busybox for Windows. What I need is a shell and enough POSIX utilities
>> > to run git shell scripts without any dependencies. Windows users
>> > (including myself when I have to use Windows) hate dependencies.
>>
>> I think that if you succeed to compile ash on MinGW, the rest is easy.
>
> No it's not. With a couple of ifdefs you can compile it fine. Then
> there goes fork(), fcntl(F_DUPFD), /dev/*, job/signal handling...
> Fortunately Git does not use lots of features. It only needs
> /dev/null (and /dev/zero for tests), SIGEXIT and no job usage.. That
> cuts down the effort porting ash.

And here I was tempted to multithread builtin-update-index.c: it is
actually quite natural to let one process scan directories
non-recursively, stat the files, sort them on a per-directory grain
and feed a sorted pseudo-index into a pipeline (recursing to scanning
whenever hitting a directory), then let another process/thread do a
merge-pass of pseudo-index and real index, immediately writing the
output to a new index-to-be.  When this is finished and another
process invalidated the old index already, reuse the index-to-be as
pseudo-index and merge it with the new-index-which-got-in-ahead-of-me.

Would be a fun exercise in particular when merely using
(block-buffered!) pipes, and could presumably make a difference on
multiprocessor-capable machines.

Anyway, just something that had been spinning in my head.  The
"streaming merge" idea has the advantage of keeping memory usage low
pretty much independently of project size: project memory is pretty
much determined by the reader pass since it has to read in a complete
directory level before it can sort it and output the next element, and
it has to retain the not-yet-output elements of the ancestry.

And it is nice to have some potential for parallel processing.  But if
it is a lethal stumbling block for Windows...  It is conceivable to do
the same job instead of with pipes and files with buffers and just
switch manually between the directory scanning and merging phases.
But it would be less fun.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-07-26 18:13 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-25 10:35 Windows support Dmitry Kakurin
2007-07-25 10:40 ` Johannes Schindelin
2007-08-02  6:57   ` Asger Ottar Alstrup
2007-08-02 10:45     ` Johannes Schindelin
2007-07-25 11:12 ` Steven Grimm
2007-07-26  2:56   ` Dmitry Kakurin
2007-07-26  3:15     ` Shawn O. Pearce
2007-07-26  6:25       ` Steffen Prohaska
2007-07-26  6:53         ` Shawn O. Pearce
2007-07-26  9:41           ` Marius Storm-Olsen
2007-07-26  9:44             ` Marius Storm-Olsen
2007-07-26  5:11     ` Steven Grimm
2007-07-25 11:13 ` Steven Grimm
2007-07-25 12:13 ` Nguyen Thai Ngoc Duy
2007-07-25 14:10   ` Johannes Schindelin
2007-07-25 14:15     ` Nguyen Thai Ngoc Duy
2007-07-25 17:13       ` Johannes Schindelin
2007-07-26 13:00       ` Christian MICHON
2007-07-26 13:20         ` Nguyen Thai Ngoc Duy
2007-07-26 13:32           ` Christian MICHON
2007-07-26 13:55             ` Nguyen Thai Ngoc Duy
2007-07-26 15:25               ` Johannes Sixt
2007-07-26  2:26   ` Dmitry Kakurin
2007-07-26  3:06     ` Junio C Hamano
2007-07-26  3:18       ` Shawn O. Pearce
2007-07-26  4:30         ` Junio C Hamano
2007-07-26  5:28           ` Johannes Schindelin
2007-07-26  5:56             ` Han-Wen Nienhuys
2007-07-26  6:40               ` Johannes Schindelin
2007-07-26  7:02                 ` Han-Wen Nienhuys
2007-07-26  7:13                   ` Shawn O. Pearce
2007-07-26  7:18                     ` Han-Wen Nienhuys
2007-07-26 21:39                       ` Jakub Narebski
2007-07-26  7:52                     ` Julian Phillips
2007-07-26 11:29                   ` Nguyen Thai Ngoc Duy
2007-07-26 12:21                     ` Christian MICHON
2007-07-26 12:37                       ` Nguyen Thai Ngoc Duy
2007-07-26 14:37                         ` Johannes Schindelin
2007-07-26 15:07                           ` Nguyen Thai Ngoc Duy
2007-07-26 15:43                             ` Johannes Schindelin
2007-07-26 16:11                               ` Nguyen Thai Ngoc Duy
2007-07-26 18:13                                 ` David Kastrup [this message]
2007-07-26 19:39                                   ` Nguyen Thai Ngoc Duy
2007-07-26 20:04                                     ` David Kastrup
2007-07-26 18:18                                 ` Johannes Schindelin
2007-07-26 16:58                             ` Marius Storm-Olsen
2007-07-26 19:43                               ` Nguyen Thai Ngoc Duy
2007-07-26 20:02                                 ` Christian MICHON
2007-07-26  9:11             ` Robin Rosenberg
2007-07-26 10:35               ` Johannes Sixt
2007-07-26  3:38     ` Johannes Schindelin
2007-07-26  3:54       ` Dmitry Kakurin
2007-07-26  4:00       ` Shawn O. Pearce
2007-07-26  5:30         ` Johannes Schindelin
2007-07-26  6:08           ` Henning Rogge
2007-07-26  8:14             ` Andy Parkins
2007-07-25 12:30 ` Steffen Prohaska
2007-07-25 15:34   ` Noel Grandin
2007-07-26  6:46     ` Johannes Schindelin
2007-07-26  6:48       ` Junio C Hamano
2007-07-25 16:58   ` Stephen Cuppett
2007-07-25 17:56     ` Russ Dill
2007-07-25 19:04       ` Medve Emilian-EMMEDVE1
2007-07-25 19:13         ` Russ Dill
2007-07-25 18:43     ` Linus Torvalds
2007-07-25 22:52       ` Wincent Colaiuta
2007-07-26  9:30       ` Marius Storm-Olsen
2007-07-26  3:36     ` Shawn O. Pearce
2007-07-25 17:41 ` Daniel Barkalow

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=8564478243.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /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.