Assume that you have a program that is writing a report while it computes, and the report is a LaTeX file with text, TikZ figures, ect. that needs to be compiled to a PDF before it can be viewed properly.
By executing a command along the lines of
it can be compiled while the report is still being written. The figures in the document contain many elements, so if the program is executing faster than lualtex can compile, this doesn't terminate before the program does. As the PDF file produced by Lualatex cannot be viewed (by xpdf, evince, ect.) before compilation has completed, this means that the start of the report cannot be examined before the program writing "report.tex" is finished.
Can I let (lua)latex write checkpoints to the PDF file, so that its first pages can already be viewed while Lualatex isn't done yet?
This would allow to debug the program while it is still running. I'm talking about hours of computation time for the program here, so this would help a lot.
Some details: I don't insist on using lualatex, but pdflatex frequently runs out of memory with the report ("TeX capacity exceeded, sorry [main memory size=5000000]"). Even after stopping the program that creates the report after a few minutes, lualatex still need >30 minutes to compile the report. While the program creating the report can of course be rewritten to use LaTeX commands that are "cheaper", this is an optimization that I would like to avoid as the focus is on keeping the program simple -- the report is actually used to debug this program.