13

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?

5
  • 4
    yes (to the question in the title and the variant in your main text) Commented Jan 7, 2016 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
    Commented Jan 7, 2016 at 21:26
  • 5
    try adding \usepackage{tikz} to a document that doesn't use tikz and timing the total run time Commented Jan 7, 2016 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
    Commented Jan 7, 2016 at 22:12
  • Related question: Creating a default preamble
    – Alan Munn
    Commented Jan 7, 2016 at 22:17

1 Answer 1

12

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.

You must log in to answer this question.

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