[gnu.gcc] CCCP Internals: Why buffer input files?

djb@spacely.Jpl.Nasa.Gov (Daniel J. Burns) (08/23/89)

I have a question concerning the internal operation of cpp.  Is there a
reason, other than efficiency, for caching input files rather than
incrementally operating on stream input?


--                              
Dan Burns 
djb@spacely.jpl.nasa.gov

meissner@DG-RTP.DG.COM (Michael Meissner) (08/29/89)

In article <1989Aug23.165952.20556@elroy.jpl.nasa.gov> djb@spacely.Jpl.Nasa.Gov (Daniel J. Burns) writes:
| I have a question concerning the internal operation of cpp.  Is there a
| reason, other than efficiency, for caching input files rather than
| incrementally operating on stream input?

I've wondered this too, particularly if -pipe is used, where cc1 and
the assembler must wait for the preprocessor to be completely finished
before they even start.  Granted the preprocessor is much faster than
cc1, but it does blow up working set.  By the way, I initially
discovered this 'feature' when -pipe wouldn't work on large files, and
our OS didn't handle > 32K writes to pipes (it does now).
--
Michael Meissner, Data General.
Uucp:		...!mcnc!rti!xyzzy!meissner		If compiles were much
Internet:	meissner@dg-rtp.DG.COM			faster, when would we
Old Internet:	meissner%dg-rtp.DG.COM@relay.cs.net	have time for netnews?