Thesis & Long Documents
My Thesis Takes 5 Minutes to Compile — How to Speed It Up
A 200-page thesis with dozens of figures can take minutes to compile. Here are proven techniques to cut that time dramatically — some can reduce compile time by 90% or more.
Use Draft Mode
Draft mode replaces images with placeholder boxes, which is the single biggest speed improvement:
% Add 'draft' option to your document class:
\documentclass[draft]{report}
% Or selectively for graphics only:
\usepackage[draft]{graphicx}
% Remove 'draft' before final compilation!
% This alone can speed up compilation by 5-10xCompile Only the Chapter You're Working On
Use \includeonly to compile just the current chapter while maintaining correct page numbers and references:
% In your main.tex preamble:
\includeonly{chapters/chapter3} % Only compile chapter 3
% Your document body still lists all chapters:
\begin{document}
\include{chapters/chapter1}
\include{chapters/chapter2}
\include{chapters/chapter3} % Only this one compiles
\include{chapters/chapter4}
\end{document}Precompile Your Preamble
If your preamble loads many packages, precompile it into a format file:
% Create a file called preamble.tex with all your \usepackage lines
% Then precompile it:
% pdflatex -ini -jobname="mypreamble" "&pdflatex preamble.tex\dump"
%
% Use the precompiled format:
% pdflatex -fmt=mypreamble main.tex
%
% Alternative: use the 'mylatexformat' package:
\usepackage{mylatexformat}
% First run creates the format, subsequent runs are fasterExternalize TikZ Graphics
TikZ diagrams are recompiled every time. Externalize them to compile once:
\usepackage{tikz}
\usetikzlibrary{external}
\tikzexternalize[prefix=tikz-cache/]
% Each TikZ picture is compiled once and cached as a PDF
% Subsequent compilations skip unchanged figures
% Run with: pdflatex -shell-escape main.tex💡 Tips
- •Draft mode + \includeonly together can make a 5-minute compile take 10 seconds
- •Use latexmk instead of running pdflatex manually — it handles multiple passes automatically
- •Bibby AI compiles in the cloud with optimized servers, so compile time is much less of an issue
- •Convert large vector graphics to PDF format for faster inclusion
Try This in Bibby AI
Write LaTeX faster with AI auto-complete and instant compilation.
Start Writing Free