Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using a lot of \lstinputlisting in my document and the compilation of it is really slow. Why it takes so long? How could I make things better?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

I guess, \lstinputlisting does a lot of parsing which takes time. The manual for the listings package mentions the option savemem which can reduce compile time if you use a lot of languages. Or use the draft option to print only captions and define labels, but omit the actual listing.

I have in my current document an appendix with a lot of listings. I omit the appendix with the versions package to save some time.

share|improve this answer
    
Thanks. The savemem didn't actually save me any noticable time. I even use \lstloadlanguages just like manual says, but that didn't do either. But the draft works just fine for me –  Łukasz Klich Aug 28 '11 at 8:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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