[Gs-code-review] Run PDF files under a level of 'save'
L. Peter Deutsch
ghost at aladdin.com
Thu Feb 21 19:48:59 PST 2002
Log entry:
Makes the PDF interpreter run files under a level of 'save'. This
improves memory utilization significantly, although we don't understand
why.
Index: lib/pdf_main.ps
===================================================================
RCS file: /cvs/ghostscript/gs/lib/pdf_main.ps,v
retrieving revision 1.44
diff -C2 -r1.44 pdf_main.ps
*** lib/pdf_main.ps 21 Feb 2002 21:49:28 -0000 1.44
--- lib/pdf_main.ps 22 Feb 2002 03:44:07 -0000
***************
*** 101,106 ****
currentdict /runpdfstring .undef
! /runpdf % <file> runpdf -
! { userdict begin
/Page# null def
/Page null def
--- 101,111 ----
currentdict /runpdfstring .undef
! /runpdf { % <file> runpdf -
! userdict begin
! % It turns out that the PDF interpreter uses memory more
! % effectively if it is run under at least one level of save.
! % This is counter-intuitive, and we don't understand why it happens,
! % but the improvement is significant.
! /PDFTopSave save def
/Page# null def
/Page null def
***************
*** 141,146 ****
end % temporary dict
end % pdfdict
end % userdict
! } bind def
end % systemdict
% Redefine the procedure that the C code uses for running piped input.
--- 146,153 ----
end % temporary dict
end % pdfdict
+ end % GS_PDF_ProcSet
+ PDFTopSave restore
end % userdict
! } bind def
end % systemdict
% Redefine the procedure that the C code uses for running piped input.
--
L. Peter Deutsch | Aladdin Enterprises | 203 Santa Margarita Ave.
ghost at aladdin.com | http://www.aladdin.com | Menlo Park, CA 94025
The future of software is at http://www.opensource.org
More information about the gs-code-review
mailing list