Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!uunet!grand!day From: day@grand.UUCP (Dave Yost) Newsgroups: comp.lang.postscript Subject: Re: Large postscript files to a laserwriter Summary: how to use save/restore pairs to bracket pages Message-ID: <483@grand.UUCP> Date: 27 Feb 89 06:52:30 GMT References: <1936@goanna.oz> <3660@cidam.rmit.oz> <1175@softway.oz> Reply-To: day@grand.COM (Dave Yost) Organization: Grand Software, Inc., Los Angels, CA 213-650-1089 Lines: 54 In article <1175@softway.oz> chris@softway.oz (Chris Maltby) writes: >The best generic solution is to embed each page of text between a >restore/save pair, and save the empty environment at start time. By >restoring to the empty saved environment and then saving it again you can >cause the VM garbage collection to work much better. I think this advice should be stated more explicitly. Your advice as given could be construed to support a very bad practice that I have seen used in Pagemaker which should be banished because it is bad news for PostScript postprocessor programs. (I hope someone from Aldus is listening.) I suggest this statement: A PostScript document program should start each page of text with a save and end it with a restore. In addition to guaranteeing total page independence, this practice causes the interpreter's VM garbage collection to work much better. DO THIS: ... %%Page: 1 1 /x save def ... x restore %%Page: 2 2 /x save def ... x restore %%Trailer The bad Pagemaker trick looks like this: DO NOT DO THIS: /x save def %%Page: 1 1 x restore ... x restore ... %%Page: 2 2 x restore ... x restore ... %%Trailer --dave yost