[NTG-pdftex] processing speed

Taco Hoekwater taco at elvenkind.com
Sat May 30 23:35:17 CEST 2009

Hans Hagen wrote:
> The Thanh Han wrote:
>> On Sat, May 30, 2009 at 12:14:09PM +0200, Hartmut Henkel wrote:
>>> On Sat, 30 May 2009, The Thanh Han wrote:
>>>> so indeed pdftex seems to spend a lot of time allocating memory. The
>>>> number of zgetnode() calls is the same (708325535 in both cases),
>>>> however pdftex calls took more time...
>>> and it looks like 1.40.6 is ok, no slowdown. the main difference may be
>>> that 1.40.6 has on synctex yet.
>> I confirm that pdftex without synctex doesn't have this
>> issue (tested with 1.40.9).
> hm, i thought that synctex, when not enabled, would not have a 
> performance drawback

It shouldn't, but it could be. Variable-sized memory allocation is
rather tricky.

I believe there is a relatively easy way to test the fragmentation
issue. In get_node and free_node, just allocate and free a fixed node
size if the requested size is below a certain threshold. (10 memory
words should be ok, I think the only potentially larger nodes in
pdftex are \parshapes, and these don't apply in this case).

This wastes memory, but because now all nodes have the same size,
there won't be any fragmentation problems. If it still slows down,
something else is causing the problems, right?

Best wishes,

More information about the ntg-pdftex mailing list