"James C. McPherson" wrote: > Roland Mainz wrote: > > Bob Friesenhahn wrote: [snip] > > Per alanc's request I already did some investigation in this area since > > the FOX tree has some compile time trouble with libtool... > > ... part of the problem is that "libtool" acts like half a |fork()|-bomb > > and triggers many many child processes (as seen with the Dtrace > > fork-o-meter.d script). > > I did a small test and replaced #!/usr/bin/bash with #!/usr/bin/ksh93 > > and did some other changes > > you did the replacement in the libtool script, or in configure?
Erm... I hacked the installed bits on Solaris 11/B84 by hand... ... but AFAIK you can get a similar effect by using $ (CONFIG_SHELL=/usr/bin/ksh93 /usr/bin/ksh93 ./configure) # ... > >- the resulting build time spend with > > libtool processes (e.g. "bash") droped to ~~46% of the original > > execution time (measured over five builds each (OkOk... that's not a > > perfect benchmark... ;-/ (nor do I claim to be an expert in > > benchmarking... ;-/))) ... and I'm confident that more performance can > > be pressed out of te script by using more of the ksh93 builtin commands > > (e.g. "basename" etc.) and replace some calls to "sed" by builtin string > > operators... and finally the ksh93-integration update1 will deliver > > "shcomp" (the ksh93 shell script compiler) which will help to squish > > even more performance out of such a script... > > I guess the next question is, how easy would it be to propagate > this change to both dolt and libtool? Depend on how upstream likes the following changes: 1. Replace... -- snip -- #!/bin/bash -- snip -- ... with... -- snip -- #!/usr/bin/ksh93 builtin basename builtin dirname builtin mkdir builtin rmdir builtin rm builtin ln builtin mv builtin chmod builtin chown builtin expr builtin cat -- snip -- 2. Using "shcomp" is just a plain compile thing, e.g. if the script uses ksh >= ksh93 and a binary called "shcomp" is present: Use it to compile "libtool". 3. libtool and related scripts could be preprocessed to replace lots of "expr"&co. madness with POSIX shell syntax, e.g. arithmetric operators (like "(( x=x+1 ))" ) would be faster. Writing a patch for that is easy but I would prefer only doing the work if upstream is Ok with that. 4. Manually replace some "sed" stuff with ksh93/bash string operators (at least two calls to "sed" can go away this way...) Anyway... if there is any interest please file a RFE... :-) ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)