home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v4 / text0004.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  3.7 KB

  1. Date: Wed, 4 Dec 85 21:31:45 cst
  2. From: allegra!jpl (John P. Linderman)
  3.  
  4. Geoff Kuenning ({hplabs,ihnp4}!trwrb!desint!geoff) raises some
  5. interesting points.
  6.  
  7. > Have you every typed "show *" on VMS (or whatever the syntax is;  I'm
  8. > glad to say I've forgotten)?  [Nope. jpl] You will get a list of literally
  9. > *hundreds* of environment variables, most of which are absolutely
  10. > necessary for the system to work properly.  The result is you can never
  11. > find anything.
  12. > It is *not* a good idea to cavalierly add variables to the environment.
  13.  
  14. Perhaps my posting was unclear.  The environment variable was to be used
  15. to *override* values that were always present in limit.h or /etc/limits.
  16. It is not necessary to use environment variables if you are willing to
  17. live with the defaults.
  18.  
  19. > In the first place, it increases the cost of forking *and* exec-ing,
  20.  
  21. I have certainly heard this stated often enough, but I have never
  22. really observed it.  Perhaps I run on larger machines, or have a
  23. smaller environment.  If we are talking hundredths of a second, it isn't
  24. worth discussing.  If we are talking seconds, I think your fork
  25. and exec are broken.  Anybody have hard documentation on the effect
  26. of environment size?
  27.  
  28. > in the second place every program has to provide for the variable, and
  29.  
  30. I draw a blank on this one.  The putative library routine that looks
  31. up the values also handles the environment variable.  No other source
  32. code cares.  This is in sharp distinction to alternatives such as
  33. adding a command line argument to override default values.  This
  34. approach really *does* make life complicated, not only because
  35. every program must anticipate the command line argument, but also
  36. because the argument must somehow get explicitly passed into every
  37. exec instead of sliding silently along in the environment.
  38.  
  39. > in the third place it makes the user's life more difficult.  I'm already
  40. > harassed enough by the size of my environment, thank you.
  41.  
  42. Sorry to hear that.  I hope it gets better.
  43.  
  44. > Talking about his proposed solution (posted with the article, John writes
  45. > that if you try out his
  46. > >program, you will recognize one problem.  It's slow.  I claim this is
  47. > >a non-problem: look up your values once, and then run nice and fast.
  48. > Give me a break, John.  Do you seriously expect me to wait for you to
  49. > run cc and sed every time I want to start up the editor?  I realize
  50. > that your program is a quick hack, but I don't think we can just
  51. > cavalierly write off startup time.  Most BSD users already run with
  52. > TERMCAP in their environment, solely as a kludge to get around the cost
  53.  
  54. I'm beginning to see why you are harassed by the size of you environment. :-)
  55.  
  56. > of reading through /etc/termcap.  We need to remember that startup times
  57. > *are* important, and it is very expensive to open and read through even
  58. > a small file.
  59.  
  60. I think this is a valid point, although the editor I use already opens
  61. .exrc files in the current directory and my home directory, and
  62. snuffles around in /etc/termcap and who knows what else.  Running the
  63. preprocessor probably wouldn't slow it down much more.  I think Geoff
  64. and I have different visions about what commands might use this
  65. run-time lookup mechanism.  If we assume that the main reason for the
  66. mechanism is to allow runtime lookup of critical values that may
  67. reasonably be expected to vary between binary-compatible machines, then
  68. the mechanism should be of no use to the vast majority of existing
  69. commands.  What does echo need to know that is going to change from
  70. machine to machine?  The applications I had in mind were large data
  71. base applications or other special purpose routines that stressed the
  72. limits of machine resources.  As Geoff points out, the mechanism is
  73. not well suited to commands whose running times are very short.
  74.  
  75. Volume-Number: Volume 4, Number 5
  76.  
  77.