libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Announcing Dolt, a drop-in Libtool replacement


From: Bruce Korb
Subject: Re: Announcing Dolt, a drop-in Libtool replacement
Date: Wed, 9 Apr 2008 20:28:47 -0700

Bob Friesenhahn wrote:
> On Wed, 9 Apr 2008, Eric Blake wrote:
>> | Since shell scripts are not compiled, the size of a shell script has
>> | very little to do with its execution time.
>>
>> On the other hand, recent improvements in autoconf 2.62 proved that we
>> were able to speed up testsuite performance by more than 10% by merely
>> refactoring Autotest output to avoid shell parsing of code that would not
>> be executed.  In other words, the time the shell spends on parsing its
>> input, whether or not that input is executed, is not trivial.
>
> This is true.  The script could be 10MB in size but if only the first
> five lines are ever executed the execution time should be similar to a
> similar five line script.  This means that parts which are executed
> often should be up front.
>
> If there is a long list of shell functions which appear up front, then
> all those shell functions need to be parsed and remembered before the
> real executable code is executed.
>
> There may be value to extracting these shell functions into separate
> files which are sourced only when needed.  This way the overhead of
> parsing "linking" code is not encountered while compiling, and
> vice-versa.  Since there is surely overhead associated with opening and
> sourcing a file the chunk of code should be pretty large.
>
> Unfortunately, more files gives people more to complain about since a
> single large file is less offensive than many smaller files.

Once upon a time, long, long ago and far, far away, I started futzing
with a C wrapper around lots of this stuff.  The point being to keep
all the text in one place (avoiding a gazillion files) and having the
shell parse only the text relevant to not just the mode, but also
whatever else could easily be determined in a binary and passed on
to a shell.  It saved a lot of time.  You did have to compile the
thing once at the beginning, but that gets lost in the noise.  The
difference was huge.  Real Life got in the way tho....

Hope this works out better :)  Cheers -Bruce




reply via email to

[Prev in Thread] Current Thread [Next in Thread]