[Dev-luatex] Benchmark.

David Kastrup dak at gnu.org
Tue Apr 3 17:43:01 CEST 2007

David Kastrup <dak at gnu.org> writes:

> David Kastrup <dak at gnu.org> writes:
>> Taco Hoekwater <taco at elvenkind.com> writes:
>>> David Kastrup wrote:
>>>> Now the LuaTeX documentation explicitly says that hyphenation in
>>>> iniTeX may crash the system.  Any idea how hard it would be to fix?
>>> Probably fairly easy, but there is little point in fixing code that
>>> will be removed soon. If you want to jump into this issue at this
>>> moment, just use Aleph instead. The whole problem is inherited
>>> from Omega 1 anyway.
>> I am not interested in fixing bugs as an intellectual exercise.  If
>> you are planning on removing that code, no point in trying to get
>> acquainted with the current code.
>> The dump file now contains some large sections of zeros at the end,
>> but I presume that those will just be Omega's 64k register arrays.
>> There is vast seemingly repetitive content earlier on in the dump;
>> I'll see whether I can make anything of it.  Of course, a large number
>> of character nodes is to be expected, but there might be more
>> involved.
> There is a fair amount of directional whatsits in the dump, but it is
> in plausible relation to the other nodes.  Lots of hlist nodes, too.
> The total size of the dump is about 8MB uncompressed.  That does not
> look too leaky to me.  Still, I tried clearing out all box registers
> and finish typesetting before dumping.  If I understood dumping
> correctly, it was supposed to compact memory before dumping.  One also
> has to keep in mind that tex.tex can be typeset with a TeX that has
> 64k words of memory.  So those 8MB, of which the main part is main
> memory, could still be considered fishy.
> But it seems like there is leakage of general average material.  dir
> nodes are just part of the matter.
> Doing the test with normal TeX leads to a format 300k in size.  Doing
> it with PDFTeX results in 360k.
> So the 8MB from LuaTeX _do_ look out of kilter, even considering the
> larger register arrays at the end of the dump.

What is this?

    @ Conversely, when \TeX\ is finished on the current level, the former
    state is restored by calling |pop_nest|. This routine will never be
    called at the lowest semantic level, nor will it be called unless |head|
    is a node that should be returned to free memory.

    @p procedure pop_nest; {leave a semantic level, re-enter the old}
    if local_par<>null then begin
      if local_par_bool then begin end {|tail_append(local_par)|}
      else free_node(local_par,local_par_size);
    free_avail(head); decr(nest_ptr); cur_list:=nest[nest_ptr];

The local_par stuff pretty much looks like an _intentional_ memory
leak.  But it is probably not triggered by tex.tex.

I think I am getting annoyed by the hackish appearance of Omega, and
the quality of the code documentation does not exactly help.

I guess that's enough headaches for today.

David Kastrup

More information about the dev-luatex mailing list