0

To compile my document (even a little one), my computer needs to load a lot of packages. During compilation (with pdflatex) I can see in the terminal that most of the compiling time is used to load the packages.

It would save me lot of time (and ressources) if it was possible to keep the loaded packages in memory and resume compiling operations after that step when I don't modify the preamble.

Is this feasible?

Tobard
  • 1,189
  • 1
    Have a look at https://tex.stackexchange.com/questions/79493/ultrafast-pdflatex-with-precompiling – samcarter_is_at_topanswers.xyz Sep 08 '23 at 13:30
  • 1
    The package mylatexformat might be of interest. – campa Sep 08 '23 at 13:31
  • 1
    I take it that you use the same preamle for every document, whether or not the packages loaded are ever used. – John Kormylo Sep 08 '23 at 14:06
  • 4
    are you sure you need all this packages? – Ulrike Fischer Sep 08 '23 at 14:09
  • Are you sure the time it takes for the output to appear on the terminal reflects the compilation time? That is, loading a package is one thing and displaying the associated information is another. More generally, are your documents very short? Or your preambles extremely long? I see the phenomenon you're describing with minimal examples where the packages loaded are hefty (e.g. tikz, tcolorbox etc.), but not with regular documents. – cfr Sep 08 '23 at 14:50
  • I indeed have the same preamble for numerous document and I use some heavy packages such à TikZ. I cannot afford deactivate selectively one package or another. – Tobard Sep 08 '23 at 15:52
  • 2
    You really shouldn't add packages that you don't need, for the very reason you state, amongst others. Either delete the packages you don't need or at least comment them out before compiling. Preambles are meant to be specific to your document's needs; you shouldn't use a one-size-fits-all approach. – Kenneth Odle Sep 08 '23 at 21:25
  • I didn't have this compiling issue with my old computer (i5 4 cores). The fact is my new notebook has more cores but at a lower frequency and now a call to pgfplots and some libraries takes precious time even for very simple document. – Tobard Sep 10 '23 at 20:52

0 Answers0