On 12/21/2023 10:01 AM, Henrik Mannerström wrote:
On Thu, Dec 21, 2023 at 10:40 AM luigi scarso <[email protected] <mailto:[email protected]>> wrote:

    I think we should  start from
    
https://tex.stackexchange.com/questions/324559/guidelines-for-using-mylatexformat-with-luatex
 
<https://tex.stackexchange.com/questions/324559/guidelines-for-using-mylatexformat-with-luatex>

True! The goal behind my question was a bit more ambitious: Do dump (serialise) the whole state of the luatex engine into a restartable glob. Or even better, to have a tex-server that never leaves memory. This way I can do my type-recompile loop without interrupting by flow.

On modern machines and os's tex actually never leaves memory; the binary and format are likely cached. Just compare two times making a format after a machine startup.

As a service one would have to reset some states ... which ones? How to reset bits of lua without restarting it?

    (precompiled format it's a bit misleading --  a format it's already
    a  set of compiled macros. I prefer custom format, as the link says)

It does not have to be a custom format in a strict TeX-sense, in that it is saved somewhere permanently. I usually work on only one document at a time, so I'm totally happy with one lengthy setup and then fast iterations.

You can only partially save the state of lua. In tex there's also the backend to keep in mind which has its own states. And here's the multiple run issue. It gets really complex.

What you could try to do is start N tex instances and let them sit idle till triggered and onece doen start it again, but then teh controller program needs to know which ons is ready.

What does has some impact is large cpu caches, fast memory (here ddr4 can beat ddr5), not having some zoom session (trying to improve a fuzzy real time image) or 25 browser tabs open (taking gig's of mem) with a music app running in the background.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

Reply via email to