in reply to Re^2: how to read big postscript files
in thread how to read big postscript files
So you don't have a problem with reading large Postscript files, you have a problem with processing them.
Maybe it would be less hard on your machine if you didn't process the whole file in one go. For example, you could write the images to disk instead of keeping them around in memory. Also, you can do the replacements on the parts of the file instead of doing the replacements on the file at once.
Also, I'm quite unclear what the replacement loop is supposed to be doing, but maybe you can rewrite that code using /ge from perlre. It seems to make heavy use of $&, which tends to be slow.
|
|---|