On Fri, May 29, 2009 at 11:02:22AM +0200, Hans Hagen wrote:
The Thanh Han wrote:
On Fri, May 29, 2009 at 01:05:40AM +0200, Reinhard Kotucha wrote:
Hi, did anybody observe already that pdftex gets slower and slower when processing huge documents?
[...]
You'll see that at the beginning Knuth's TeX and pdfTeX need approximately the same amount of time to process one \input file. But while Knuth's TeX needs the same amount of time to process any \input file, the amount of time pdfTeX needs increases steadily.
I confirm this symptom with pdftex-1.40.9. Not sure what is the cause yet...
i did a couple of tests (on windows so with other test files) and it looks like the problem is with the 'filename' (actually this is a kind of known issue); the filename ends up in the pool (and string) memory and although (if i remember right) etex reclaims that memory it looks like in pdftex (and luatex) that's not the case; eventually i run out of pool in both
putting the sample text in a macro (i.e. reading it once) works fine so it is related to the "\input <filename>"
indeed it must be something with string recycling (in tex.ch) during "\input something"; however both tex & pdftex (in texlive) seem not to release the filename string, but pdftex takes longer to process later \input's. FWIW, pdftex doesn't create new strings in Reinhard's example (it runs in dvi mode). Thanh