pdflatex - how to find bottleneck of long compiling time for my document

You could build your timer with \pdfelapsedtime:

\usepackage{atbegshi}
\newcommand\showtimer{%
  \message{^^Jtimer: \the\numexpr\the\pdfelapsedtime*1000/65536\relax}%
  \pdfresettimer}
\AtBeginDocument{\showtimer}
\AtBeginShipout {\showtimer}

would print the time it took (in milliseconds) for each page to be output (here p. 231 took 103ms, p. 232 took 44ms):

timer: 103 [231] 
timer: 44 [232] 

Note that due to the asynchronous nature of tex's output routine, this isn't completely exact: firstly, the page breaker usually only kicks in after a paragraph break, so that material that will actually end up on the next page (or even pages for very long paragraphs) has already been processed; secondly, inserts (floats, footnotes) may have been processed already earlier -- for example, split footnotes or floats that didn't fit on the previous page(s). So the numbers may actually measure the processing time both of material from previous and from later pages.


For evaluation you can extract those lines:

grep '^timer:' filename.log > Compiletime.txt

Have you tried the \typeout{msg} command.

http://www.personal.ceu.hu/tex/termio.htm

It might not be the nicest solution but with some cleverly placed \typeout commands, you might find what you are looking for.

And if I remember correctly, there is a comment package to comment out large parts of your (La)Tex code.