[Tex/LaTex] Speed up beamer compile time

beamercompiling

Is there a way to speed up the compile time? I have a, I would say, medium-sized presentation and it takes 10+ seconds to compile. It isn't too much, but it's annoying. Especially since I'm performing minor local changes between the compilations. Is there a way to tell beamer to compile only the parts that changed?

My manual solution is to take parts of the presentation out to a different file, comment out the \include and put it back in at the end. I.e.:

...
\begin{document}
%\include{Section-1-done}
%\include{Section-2-done}
\include{Section-3-in-progress}
...

Best Answer

Section 4.3.3 of the beamer user guide (texdoc beamer on a Unix system) is called "Ways of Improving Compilation Speed". There are two suggestions there: to use the draft class option, and to use the \includeonlyframes{list,of,frames,to,process} command. This means that only frames whose label matches one in the list will get processes. The suggestion is to have \includeonlyframes{current} and to keep moving the current label from frame to frame as you work on different ones.

MWE:

\documentclass{beamer}
\includeonlyframes{current}
\begin{document}

\begin{frame}[label=current]
    This frame will be included. 
\end{frame}

\begin{frame}
    This frame will NOT be included. 
\end{frame}

\end{document}
Related Question