I use latexmk in texstudio on win7. Working on a 400+ pages book with a lot of figures and tables, citations and indexterms, it takes more than five minutes to compile the book once. The full compilation (at least for times) takes close to half an hour. This I could stomach easily. However, I noticed that half of the compilation time it is not pdflatex running but kpsewhich.
I have organized the whole book and texlive on a fast ssd. Texlive is updated regularly. Please can anybody tell me why kpsewhich takes over for an extended time? I was told earlier that it searches the entire computer. When this is the case how to tell kpsewhich to focus on the ssd? Are there any environnemental variables to add?
BTW Running PDFlatex directly and not latexmk does not involve kpsewhich.
Kind regards Bernhard
Edit:
Here the (partial) output when removing the -silent option from the latexmk command. Pdflatex stops after
Latexmk: Log file says output to 'VierteDeutscheEdition.pdf'
and kpsewhich takes over. Unfortunately there is no kpsewhich output. After kpsewhich is run the rest of the message appears. ...
Output written on VierteDeutscheEdition.pdf (581 pages, 170933099 bytes).
SyncTeX written on VierteDeutscheEdition.synctex.gz.
Transcript written on VierteDeutscheEdition.log.
Latexmk: Index file 'VierteDeutscheEdition.idx' was written
Latexmk: Found input bbl file 'VierteDeutscheEdition.bbl'
Latexmk: Log file says output to 'VierteDeutscheEdition.pdf'
Stop of pdflatex
Latexmk: List of undefined refs and citations:
Reference `sec:sugarmetabolism' on page 39 undefined on input line 39
Reference `sec:sugarmetabolism' on page 473 undefined on input line 8
Reference `sec:sugarmetabolism' on page 85 undefined on input line 68
Biber warning: [32485] Utils.pm:164> WARN - I didn't find a database entry for 'CSV+87' (section 5) Biber warning: [32486] Utils.pm:164
WARN - I didn't find a database entry for 'THH+13' (section 5)
Biber warning: [39095] Utils.pm:164> WARN - I didn't find a database entry for 'Loveland11a' (section 9) Biber warning: [44320] Utils.pm:164
WARN - month field 'Nov' in entry 'CWT+98' is not an integer - this will probably not sort properly. Biber warning: [44336] Utils.pm:164
WARN - month field 'Nov' in entry 'RYF+98' is not an integer - this will probably not sort properly. Biber warning: [44348] Utils.pm:164
WARN - month field 'Apr' in entry 'HLH08' is not an integer - this will probably not sort properly. Biber warning: [44357] Utils.pm:164
...
Latexmk: Found biber source file(s) [Literatur/EndokrinologieKunde.bib Literatur/FatMetabolism.bib Literatur/Leptin.bib VierteDeutscheEdition.bcf]
Latexmk: Summary of warnings: Latex failed to resolve 5 reference(s)
Latexmk: All targets (VierteDeutscheEdition.pdf) are up-to-date
pdflatexdirectly? – Jan Jan 08 '17 at 11:35latexmk– egreg Jan 08 '17 at 11:38latexmk -pdf book.tex(use your own file name), manually via a dos prompt? – daleif Jan 08 '17 at 12:06\input,\includeand gfx get passed on to kpsewhich. – daleif Jan 09 '17 at 14:50kpsewhich -var-value TEXINPUTS, if that variable is not set correctly,kpsewhichmay end up behaving badly. BTW: please remember, the @texmf-local, why doeslatexmksearch for these usingkpsewhichwhen the full path to them it listed in the log (at least on texlive)? – daleif Jan 13 '17 at 14:36<daleif-test2.pdf, id=3, 321.2pt x 240.9pt>,<use daleif-test2.pdf>and</opt/texlive/texmf-local/tex/daleif/daleif-hest0.pdf>. Hmm, but the full path to each is still listed in the fls file. Hmm. – daleif Jan 13 '17 at 14:38texmf-local– samcarter_is_at_topanswers.xyz Jan 13 '17 at 14:41latexmkvery much for all small project, but for my big project I changed the building tool because of this problem. First I switched to ltx2any, which is equally comfortable - has the disadvantage that it compiles at least one time. Now I work with arara, there one has to think a bit to get the same workflow as with latexmk, but in the end you can exactly control anything. – samcarter_is_at_topanswers.xyz Jan 13 '17 at 14:46latexmktakes 299.31 s, from these only 188.18 s are spent forbiberand 4xpdflatex. (measured withlatexmk -time) – samcarter_is_at_topanswers.xyz Jan 13 '17 at 14:51\includeonlya lot. – daleif Jan 13 '17 at 14:52texmf-localcauses this problem. I went away from\graphicspath, as the images are sorted in many sub folders and I was to lacy to add them all to\graphicspath. (pdf)latex itself is still as fast as always, onlylatexmkdoes not like this. – samcarter_is_at_topanswers.xyz Jan 13 '17 at 14:55^File: (.+) Graphic file \(type, if the file is intexmf-local(.+)ends up as being saydaleif-test0.pdf, but later in the file, when pdflatex has included the file then the actual full path is added in<...>. This might though be engine dependant. – daleif Jan 13 '17 at 15:12texmf-local. Maybe this is part of the problem. – samcarter_is_at_topanswers.xyz Jan 13 '17 at 15:39kpsewhichcalls are unnecessary. – daleif Jan 13 '17 at 15:51latexmksoon (i.e., within a day). – John Collins Jan 13 '17 at 21:03-timeoption – daleif Jan 13 '17 at 21:18