Leo Butler <leo.but...@umanitoba.ca> writes: >> I am wondering if the current design with many previews generated using >> the same latex process can be extended. May we somehow add a Lua code to >> preview.sty that will not exit at all and watch for new .tex fragments >> to appear and preview them. The idea is to avoid stopping lualatex >> process most of the time (unless preamble has to be changed) and make it >> work like a server. That may bring the preview speed to acceptable levels. > > Do you mean preview.sty from the preview package [1]?
I think that it is what Kathik's branch uses. > My understanding of this thread on tug.org [2] is that there isn't an > easy way to do what you want from within luatex (and the luatex > developpers are un-interested in speeding up luatex). > > I suppose that we could create a stable of luatex processes that are > waiting for input. I don't know if that would speed things up > appreciably, though. That's exactly what I am suggesting. Because we cannot pre-compile lualatex headers, we may instead keep those headers in memory, maintaining a single lualatex process. That process will wait for input (by utilizing direct Lua) and produce fragments without having to re-load all the fonts and other header staff from scratch every single time. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>