COPCSE-NTNU / thesis-NTNU

An NTNU thesis LaTeX document class for bachelor, master, and PhD theses
MIT License
96 stars 369 forks source link

Tips for reducing compilation time? #38

Closed tonivuc closed 2 years ago

tonivuc commented 2 years ago

Hi!

I'm currently getting 17 seconds compilation time with pretty much the default project setup (only removed one paragraph the and inclusion of NTNUProsjektavtale.pdf).

I tried switching from \input to \include for the chapters in thesis.tex in order to only compile the .tex files with changes in them, but I'm not really able to measure a difference (maybe a second faster).

I'm measuring by compiling once, adding the word "Test" to the abstract, and then taking the time for that compilation.

Another project I have which is 24 pages compiles in 7.5 seconds, compared to the 17 seconds this 29 page project has.

Any idea how to reduce compilation time when using this template?

tonivuc commented 2 years ago

Removing the whole usage chapter (reducing page count to 19) reduced compilation time to 3.5 seconds. And it didn't matter if I used \include or \input, so I guess it's just the content of that chapter that's heavy.

ifarup commented 2 years ago

Interesting and strange. On my laptop the whole compilation (pdflatex, biber, makeglossaries, pdflatex, pdflatex) takes 4.9 s with everything included, and 4.2 s with Chapter 2 excluded.

It could be that the gnuplot functionality is demanding some resources. What do you think, @SimonMcCallum @marni, do we still need that?

SimonMcCallum commented 2 years ago

The gnuplot script will be causing the increase load. We could certainly just leave it as a comment and explain that it will increase compilation time.

ifarup commented 2 years ago

Set out to do it now, but I see that you have already completed it in commit b6841aa87d9d07e3d0e477c5a095a0bbe46f3fd4 :) So closing the issue.