I am using Overleaf for my work and am very satisfied with its portability. One minor issue is that it always recompiles on opening a project, which is quite troublesome for big projects. Is there any option to make Overleaf reuse the last successful compilation to reduce startup time?

2 Answers 2


(Tom from Overleaf Support here.)

Unfortunately, in Overleaf, the compiled PDF and other files from a previous editing session can't be reused for technical reasons; sorry for the limitation. To this end, the intial compilation is necessary. I hope this helps clarify.

  • Thank you for your response. I saw on your blogs https://fr.overleaf.com/learn/latex/Articles/How_to_use_latexmkrc_with_Overleaf that we may use a configuration file to customize Latexmk. After reading its manual, it seems we can configure a dedicated output and aux folder. Then is it possible to reuse the folders for the next compilation?
    – qnhant5010
    Jun 15, 2022 at 10:08
  • @qnhant5010 That's not really how it works. What Overleaf does is that we do not modify the project's input files, and any file that's created during the compilation (within the right folder) is rather put into the project's cache. And this cache is what gets cleared under some circumstances. Would this clarify?
    – yo'
    Jul 19, 2022 at 9:46
  • Thank you for your clarification. There are not so much we can do then.
    – qnhant5010
    Jul 19, 2022 at 12:15

LaTeX isn't really made for partial compilations, but you have a few tools at your disposal to alleviate the problem:

  • Overleaf behaves very stupidly with LaTeX errors. Instead of stopping on the first error and reporting it, it forces its way through and tries to complete compilation. This leads to confusing error messages, uselessly long compilation times and invalid documents. Look if there's a way to halt on errors instead.
  • Don't delete the auxiliary files after compilation. That can reduce the number of successives compilations needed to generate the document once.
  • Use \includeonly in your preamble to focus on specific parts of your document.
  • I do think that OL is looking into supporting -halt-on-error, sadly this will comfuse a lot of users who are relying on each compilation producing a PDF even when there are compilation errros.
    – daleif
    Jun 15, 2022 at 8:44
  • Tom from Overleaf Support here. We shall have the "stop on first error" option quite soon. Actually, our Beta program participants should see it already this week!
    – yo'
    Jun 15, 2022 at 9:45
  • I just try includeonly for a large document with multiple include and the speed-up is impressive. However, as per the response of @yo', the aux files cannot be persisted, so I guess the long first compilation is unavoidable.
    – qnhant5010
    Jun 15, 2022 at 9:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .