Let's say I call booktabs even if I don't write any table in my document. Would it be better if I leave it out?

  • 4
    yes (to the question in the title and the variant in your main text) Jan 7 '16 at 21:26
  • 2
    Yes. For larger packages especially. For smaller packages, you probably won't notice the difference, if you only load one or two, but the more you load, the more you'll notice.
    – Alan Munn
    Jan 7 '16 at 21:26
  • 4
    try adding \usepackage{tikz} to a document that doesn't use tikz and timing the total run time Jan 7 '16 at 21:29
  • 2
    Apart from the question of speed, there’s also the problem that, the more packages you load unnecessarily, the more likely you are to get errors related to incompatibility.
    – Thérèse
    Jan 7 '16 at 22:12
  • Related question: Creating a default preamble
    – Alan Munn
    Jan 7 '16 at 22:17

The simple answer to this question is Yes. There are at least three reasons why you should avoid loading unused packages:

  1. Speed. Very large packages like TikZ will definitely increase the time it takes to compile a document because they load a lot of code, and all of that code takes time to load.

  2. Errors. Loading lots of packages can increase the possibility of interactions between packages and can sometimes lead to errors.

  3. Debugging. When you do get an error, if you have lots of extraneous packages it may be harder to find out which package is actually responsible for the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.