Subject: Re: slow builds on interix
To: Arto Huusko <arto.huusko@utu.fi>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 07/26/2005 16:14:18
On Tue, 26 Jul 2005, Arto Huusko wrote:

> > The problem is Interix, but not the Interix subsystem.  It's actually
> > because Interix's shell is horribly slow (/bin/sh, which is actually
> > /bin/ksh -- a very old version of pdksh).
> >
> > I've been working on porting NetBSD's much faster sh(1) to Interix, but that
> > has stalled lately due to a nasty crash of my one Windoze box.  However, it
> > was rebuilt last week, so I may try my hand at that again.
>
> But why then does configure run slow when invoked through pkgsrc, and
> much faster when running the same configure script manually
> ("./configure"). The shell that does the running is the same, right?

I somewhat fudged the truth saying that it wasn't Interix.  It is Interix's
fault -- indirectly, by way of NT's really crappy memory management.  In
pkgsrc, there are more shell *layers* (and thus much more forking).  This is
compounded heavily by an old and slow shell implementation.  Just the
difference between fork(2) and vfork(2) is pretty major.

(There is a hotfix that helps this situation, but not much.  I don't know
exactly what build of PSXSS.EXE is the key, but when I find it, I'll
recommend the hotfix to Interix pkgsrc users.  Unfortunately they require a
support call to get the fix, though they refund after the fact.  <sigh>)

When I had managed to get NetBSD sh(1) running once (job control and
segfaults plagued me), it was 2-3x faster yet over manual-configure builds.

-- 
-- Todd Vierling <tv@duh.org> <tv@pobox.com> <todd@vierling.name>