Michael Hunter wrote:
> 
> On Wed, 13 Jun 2007 03:13:48 +0200
> Roland Mainz <[EMAIL PROTECTED]> wrote:
> 
> [...]
> > Erm, I simply missed the " $(ELFEXTRACT) $(DBOOT_BIN)"-line... sorry...
> > ...the code should look like this:
> > -- snip --
> >          @ ( echo " .data" ;                          \
> >              echo " .globl  dboot_image" ;            \
> >              echo "dboot_image:" :                    \
> >              $(ELFEXTRACT) $(DBOOT_BIN) ;             \
> >            ) > "$(DBOOT_S)"
> >          $(ELFEXTRACT) $(DBOOT_BIN)
> > -- snip --
> 
> I must admit I like how this code looks.
> 
> > from the viewpoint of performace this currently doesn't save much (e.g.
> > you save lots of |open()|+|close()| calls) ... but if you use ksh you
> > can replace the "echo" statements with "print" (which is like "echo"
> > except that it is a ksh builtin command and therefore saves the
> > |fork()|+|exec()|) and use a block (e.g. "{ ... ; }" instead of a
> > subshell (e.g. "( ... )") which saves another |fork()|.
> [...]
> 
> The shell is a workhorse.  I can't see going back and rototilling a
> bunch of scripts for micro optimization.

This example may be a micro optimisation - but there are other, similar
cases which quickly eat-up lots of minutes during the build on a fast
machine (the POUND_SIGN thing is one example which could easily be
removed) ... and other people (like myself) only own an Ultra5 to
compile OS/Net (and this kind of machine usually needs two days to crawl
over all the code) and there these "small" optimisations have an even
greater impact. It all sums up...

> Put out a good style guide
> and hold future changes to high standards.

Style guide is currently under construction, see
http://www.opensolaris.org/os/project/shell/shellstyle/ (currently it's
a wild mixture of Bourne/ksh88/ksh93 constructs/rules, I still need to
do some cleanup and then pass the result through DocBook profiling to
make it slightly clearer) ...

> That makes more sense to me.

What happened to the idea of a "janitor project" to actively cleanup
things in the OS/Net codebase ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) [EMAIL PROTECTED]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to