7

I understand that LaTeX cannot parallel process a whole document because of the layout algorithm which is intrinsiquely linear.

However, in my understanding, the overlay specifications of successive slides within each frame in a beamer class are just expanded into repeated, successive pages in a .pdf.

Is the compiling of various slides in one frame a beamer document parallelizable? If yes, how to enjoy it?


For instance, if I have to insert:

\begin{frame}
    \only<3-> {heavy stuff} % e.g. graphics, loads of tikz, video, etc..
    \foreach \i in {4,...,23} {
         \only<\i->{light stuff \i}
    }
\end{frame}

then the heavy stuff operation will be performed twice if the frame lasts on 5 slides, and 20 times linearly if the frame lasts on 23 slides.. so it will take forever to compile.. is this avoidable?

7
  • 9
    I would put the {heavy stuff} in a savebox and the copy it in the slide. – Rmano Apr 5 '16 at 12:29
  • This sounds cool and should speed up compilation time indeed, cheers :) Any ideas about parallel processing of slides within frames? – iago-lito 'considering leaving Apr 5 '16 at 12:31
  • 3
    If the heavy stuff can be externalized (TikZ or other graphics, for example), then the answers at Integrating latexmk and TikZ external mode=list and make could be helpful. – Mike Renfro Apr 5 '16 at 13:07
  • @MikeRenfro hmm, I've never heard of this before, and it sounds interesting.. I'll look into this :) – iago-lito 'considering leaving Apr 5 '16 at 13:11
  • 1
    The answer to the parallelism question has to be: no. The content of a given overlay can depend on the compliation of the previous ones: e.g. \def\foo{foo} and then in the frame foreach loop \only<\i->{\foo\xdef\foo{baz\foo}} – Andrew Swann May 13 '20 at 14:29