I've used Cygwin's pdflatex for the better part of a decade now.
Being a non-administrator, I was locked down to a 2015 installation
for several years. At around 2019, I was given the opportunity to
update Cygwin, and I think it was around that time that I saw a marked
slow down in pdflatex's processing of LaTeX documents, even small
ones (my document sizes haven't changed much through the years).
Since I work with multiple laptops, I estimate that this started
occuring for me circa summer 2019, plus/minus perhaps 4 months. It is
possible that the actual slowdown in Cygwin's pdflatex started well
before then, with me being stuck in an 2015 installation and
blissfully unaware.
I've done the online web search. I see complaints dating well before 2019 of Cygwin and various LaTeX processing software being slow, but no mention of a marked slowdown occuring between 2015 and 2019.
Since I am very much at the user level rather than admin level, I rely alot on the configuration of Cygwin apps as-installed. But I sometimes poke deeper, especially when repeatedly experiencing the agonizing slowness of compilation. What might cause this slowdown, and what measures can I take to mitigate this?
I'm seriously considering switching to MiKTeX, even though I would very much dislike leaving the non-GUI environment of Bash and Vim.
TROUBLESHOOTING
A minimal example file accompanied by the organizational texmf subtree compiled slowly too, i.e, with no references or acronyms. The console output scrolled very slowly compared to the 2015 installation.
In the console output, I sometimes see a single line of what seems like page numbers adorned with square brackets print out slowly. My naive impression from this is that this slowness is due to processing other than file searching.
I compared timed execution with MiKTeX and found it even slower than Cygwin's
pdflatex(as predicted by Steven B. Segletes & Ulrike Fischer).Erased auxiliary files and ran Bash script
mkpdf.bashcontaining the usualpdflatex,bibtex,pdflatexx2Timed the execution from Cygwin's Bash with
time ./mkpdf.bash: 1m56sTwo tries of incremental runs of
pdflatexusing Cygwin's Bash: 38s, 37s
export TEXMFHOME=texmf
time pdflatex MainDocument.texMiKTeX with no "aux" files (
pdfLaTeX+MakeIndex+BibTex): 2m18sChoose incremental
pdfLaTeXbeside MiKTeX "play" button: 43s
pdflatexis to pdfTeX. The TeX Live pages I found say that it is a distribution of TeX, and I assume PdfTex as well. Does Cygwin'spdflatexuse Tex Live? I also googledls-R; it creates~/texmf/ls-R, which I don't have. I have a my owntexmftree in the working folder of my document; it contains nols-R. I Googledls-R, but I think it requires much deeper expertise than I have. You mentioned using a Windows Tex Live, but if give up on Cygwin, I'll try MiKTeX 1st, since I've used it before. – user2153235 Mar 09 '21 at 16:23acropackage), so it doesn't explain the several-fold slowdown in upgrading Cygwin. I can't recall exactly, but there was likely a short period when I had both old and new Cygwin installations, and noticed the speed difference for the same document. As for which passes are slowest, I do the typicalpdflatex,bibtex, andpdflatex(x2). I haven't noticed a difference in slowness between them but will keep an eye out. I do have ToC & list of references. – user2153235 Mar 09 '21 at 16:43pdflatexand Tex Live. After rummaging, I am 95% sure that Cygwin relies on Tex Live, andpdflatexis part of that or relies on that. If the slowdown is due to misconfigured file search, it would have to be misconfigured out-of-the-box; that's how I usepdflatex. Unless my document-specifictexmftree is responsible, and that tree is from my organization's wizards. I suspect that thetexmftree is not responsible, however, because all the organization uses copies of it, and I've heard no complaints (they use MiKTeX). – user2153235 Mar 09 '21 at 18:30texmftree, but with MiKTeK. No one has complained. Raw speed under normal operation isn't my concern, but rather, black-box speed, including misconfiguration. Even if MiKTeK is normally slower, I will go for it if it avoids this very pronounced slowdown I'm experiencing with Cygwin. – user2153235 Mar 09 '21 at 19:07\documentclass{article}will have to search the filesystem to check there is no article.cls in your local texmf before using the quick hashed file lookup to access the standard copy. – David Carlisle Mar 09 '21 at 19:43texmfcontains only 34 files, and the custom-named document class is found therein, so it probably isn't the source of the slowdown. I'm starting to wonder if file configuration is the problem. – user2153235 Mar 09 '21 at 20:20ls-Ris located intexmf-dist. I found it at/usr/share/texmf-dist/ls-R. It doesn't shed light on the slowdown, but it's nice to find it after failing to do so. – user2153235 Mar 09 '21 at 20:22