Alan Coopersmith wrote: > Roland Mainz wrote: > > ksh93-integration update1 landed a few days ago and added "shcomp" (the > > shell script compiler) and a matching kernel module to recognize the > > bytecode... > > ... does anyone have suggestions for which scripts a compilation would > > be usefull ? > > What about a shell script makes it useful to compile it? Is it just > shell scripts with a runtime longer than a fraction of a second that > will be sped up by compiling or is there some other benefit/criteria?
The ksh93-integration update1 heads-up notice (http://mail.opensolaris.org/pipermail/opensolaris-announce/2008-December/001997.html) AFAIK had some of the criteria when using the shell script compiler is usefull: -- snip -- - Compiled shell scripts may be usefull in the following cases: - Reduced startup time - Better performance (for small shell scripts) - Reduced disk space (e.g. for LiveCD environments) - Binary-only deliveries (e.g. closed-source executables) -- snip -- The startup time improvement depends a bit on the size of the script and the locale being used (e.g. scripts parsed in a multibyte locale need ~~15%-20% more parsing time). On an Ultra5 using the "C" locale and a script with a single "true ; true" as script the difference is around 0.02 seconds (e.g. this is the minimum), for larger scripts the size increases (for example on the same machine a 100k script in the en_US.UTF-8 locale needs around 0.7 seconds to parse, using "shcomp" this time is reduced to less than 0.1 seconds). ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)