Taco Hoekwater
After some testing with a profiled binary, it turned out that LuaTeX spends nearly 90% of its run time inside the get_token() function when it is processing tex.tex completely (535 pages), but only 10% if it runs only the first 20 or so pages.
Interesting.
Since get_token() is tex's internal version of malloc() more or less, I deduced that it was likely that there was an internal memory leak (unfreed node) that makes it harder for get_node() to find a new one when it is asked.
Running a test file with \tracingstats=2 shows the variable memory usage gradually going up in both luatex and aleph, but not at all in pdftex, so the leak probably comes from omega. That makes the 'dir_node' the most likely suspect. More later.
Well, looking through, I noticed something of sub-Knuthian quality: @d push_dir(#)== begin dir_tmp:=new_dir(#); link(dir_tmp):=dir_ptr; dir_ptr:=dir_tmp; dir_ptr:=dir_tmp; end Note the duplication of the last assignment. Not tragic, but ugly. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum