On 26/08/2008, at 10:44 AM, Brad Miller wrote:
Run the following command in your terminal window.
defaults write com.macromates.textmate latexDebug 1
Then run typeset & view again from TextMate. This may help identify where the delay is coming from.
In my case, I get this:
turning on debug %!TEX Directives: {'root': '/Users/will/PhD/Thesis/thesis.tex'} master file = thesis.tex
After a "13 spin" delay for this particular document (which is six seconds or thereabouts), it then outputs this:
TEX package list = ['thesis-preamble'] texMateVersion = $Rev: 9044 $ ...
... and continues at normal speed. So I'm guessing whatever parsing is going on to work out what's in the preamble (etc.?) isn't particularly efficient for some sorts of documents.
***
After looking at a couple more documents, I'm guessing that it's not the preamble that's slowly down the parsing but rather the number of \include{}-ed files.
***
Also, I notice that if my input document contains "stuff" after \end{document}, then it's also included in the parsing stage. If the document is:
***** small.tex ***** \documentclass{article} \usepackage{amsmath} \begin{document} test \end{document}
\documentclass{article} \usepackage{graphicx} \begin{document} test \end{document} *********************
Then the parsing includes: TEX package list = ['amsmath', 'graphicx']
I would be very confident in terminating the parsing after the first \end{document} line. On the other hand, if this slows down the parsing at all then it's probably not worth the effort, since not many people will keep multiple documents "stacked up" like this.
Will