Package: latex-make Version: 2.1.18-2 Severity: wishlist Tags: patch Hi,
latex-make is really slow. It spends a long time calling "kpsewhich" in order to find the scripts in /usr/share/texmf/scripts/latex-make. But they're always going to be in the same place on a Debian install. Please consider the attached patch to simply hardcode the paths. Maybe this could be made more flexible by allowing the user to override the variables, if that's needed (e.g., set them with "?=" instead of ":=" ) Before the patch: $ echo 'include LaTeX.mk' > Makefile $ echo '\documentclass{letter}\begin{document}test\end{document}' > test.tex $ make clean >/dev/null 2>&1 $ time make test.pdf >/dev/null 2>&1 real 0m8.278s user 0m7.244s sys 0m0.800s $ After the patch: $ echo 'include LaTeX.mk' > Makefile $ echo '\documentclass{letter}\begin{document}test\end{document}' > test.tex $ make clean >/dev/null 2>&1 $ time make test.pdf >/dev/null 2>&1 real 0m0.599s user 0m0.544s sys 0m0.080s $ That's 7.5 seconds and over 90% of the execution time saved. This can matter a lot to anyone working on a small document and doing frequent recompiles to check the output. (There may be other optimizations to do too, but this one really stuck out) -jim -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (300, 'testing'), (50, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.2.14+ (SMP w/2 CPU cores) Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages latex-make depends on: ii dpkg 1.16.3 ii ghostscript 9.05~dfsg-5 ii make 3.81-8.1 ii python 2.7.2-10 ii tex-common 3.13 ii transfig 1:3.2.5.d-1 Versions of packages latex-make recommends: ii inkscape 0.48.3.1-1+b1 ii texlive-latex-extra 2012.20120611-2 ii texlive-latex-recommended 2012.20120611-4 latex-make suggests no packages. -- no debconf information
--- /usr/include/LaTeX.mk 2012-07-12 10:41:33.000000000 -0400 +++ LaTeX.mk 2012-10-08 21:16:03.246594815 -0400 @@ -415,12 +415,12 @@ $$(eval $$(call lu-setvar-global,$(1),$$(_LU_$(1)_DEFAULT))) endef -$(eval $(call _lu_which,GENSUBFIG,gensubfig.py)) -$(eval $(call _lu_which,FIGDEPTH,figdepth.py)) -$(eval $(call _lu_which,GENSUBSVG,gensubfig.py)) -$(eval $(call _lu_which,SVGDEPTH,svgdepth.py)) -$(eval $(call _lu_which,SVG2DEV,svg2dev.py)) -$(eval $(call _lu_which,LATEXFILTER,latexfilter.py)) +_LU_GENSUBFIG := /usr/share/texmf/scripts/latex-make/gensubfig.py +_LU_FIGDEPTH := /usr/share/texmf/scripts/latex-make/figdepth.py +_LU_GENSUBSVG := /usr/share/texmf/scripts/latex-make/gensubfig.py +_LU_SVGDEPTH := /usr/share/texmf/scripts/latex-make/svgdepth.py +_LU_SVG2DEV := /usr/share/texmf/scripts/latex-make/svg2dev.py +_LU_LATEXFILTER := /usr/share/texmf/scripts/latex-make/latexfilter.py # Rules to use to check if the build document (dvi or pdf) is up-to-date # This can be overruled per document manually and/or automatically