[NTG-pdftex] [pdftex-Bugs][4290] processing speed: pdftex slows down when processes long files in DVI mode

pdftex-bugs at sarovar.org pdftex-bugs at sarovar.org
Wed Jul 1 21:46:39 CEST 2009


Bugs item #4290, was opened at 2009-06-26 17:55
Status: Open
Priority: 3
Submitted By: The Thanh Han (hanthethanh)
Assigned to: Nobody (None)
Summary: processing speed: pdftex slows down when processes long files in  DVI mode 
Category: None
Group: None
Resolution: None


Initial Comment:
see http://www.ntg.nl/pipermail/ntg-pdftex/2009-May/003786.html

----------------------------------------------------------------------

>Comment By: The Thanh Han (hanthethanh)
Date: 2009-07-01 19:46

Message:
with the help from Taco and Hartmut, the problem has been traced down to this: 

section 816 from tex the program says:

,--------
| This code assumes that a |glue_node| and a |penalty_node| occupy the
| same number of |mem|~words.
| @^data structure assumptions@>
|
| @<Get ready to start...@>=
| link(temp_head):=link(head);
| if is_char_node(tail) then tail_append(new_penalty(inf_penalty))
| else if type(tail)<>glue_node then tail_append(new_penalty(inf_penalty))
| else  begin type(tail):=penalty_node; delete_glue_ref(glue_ptr(tail));
|   flush_node_list(leader_ptr(tail)); penalty(tail):=inf_penalty;
|   end;
`--------

and synctex has changed glue_node_size to 4, so that when a paragraph is processed, there is one node that was located with size=4 but freed with size=2. Therefore the problem is only visible with very long document like Reinhard's test file.

Taco's suggestion for the problem:

> I strongly suggest you just change the penalty size to 4, because
> the other possibilities that I see have much more impact. Starting
> from the head node each time is quite slow (much slower than the
> speed penalty incurred by the extra size of the penalty node).
>
> There are other options, but increasing the penalty size is simplest
> by far. And it is not like a typical paragraph has hundreds of
> penalties, anyway.
>
> In luatex this worked out reasonably well in the end because in
> luatex the node list is doubly linked. But in pdftex there is no
> room for an extra back pointer in the node objects (nor is there
> in either tex or xetex) so that won't work without a lot of work.

and my response:

,--------
| yes this seems a good option. There is still one catch that
| pdftex without synctex still has glue_node_size=2 and
| doesn't need this change. Therefore this should better be
| done by synctex.
`--------

I have sent an email asking synctex's author for this change.


----------------------------------------------------------------------

You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=493&aid=4290&group_id=106


More information about the ntg-pdftex mailing list