[tex-k] File searching very slow

Karl Berry karl at freefriends.org
Wed Apr 14 23:20:22 CEST 2021

    np> Something to do with the upper/lower case changes that were
    introduced inbetween?

I did the casefolding stuff in 2018, so it's present in both JK's (good)
2019 and (bad) 2021. It's mentioned (the same way) in both logs.

Nevertheless, Johannes, if you want to disable the casefold stuff for
testing, change the "texmf_casefold_search = 1" assignment in texmf.cnf
to 0.

I don't know of any code changes that would have made such a difference.
And, since no one else has reported such problems (to my recollection),
it seems it must be something specific to Johannes's system.  I'm not
smart enough to guess what it is. I know little about Macs.

It does seem like failing to use ls-R is the most likely culprit, but
that's not what the logs say. I am at a loss.

I can't imagine how zsh vs. bash would make a difference. The shell is
not called with these filename lookups.

Johannes, here are some other ideas (none particularly good):

1) run kpsewhich under a debugger on the slow system, and interrupt it
while it's laboriously searching. Doing that a few times should at least
show what it's churning away at.

2) install a minimal (or not so minimal) TL from scratch on
the new system, and see if it also is slow. See

3) run some non-TeX operation on both systems to check that speed
isn't altered for that too. Maybe, I don't know, something like
  find texmf-dist -name minimal.cls -print.
4) install 2019 on the new system, and/or 2021 on the old, for direct
comparison of the code.

5) to involve people who know more about Macs, you could write
mactex at tug.org. I know little about Macs, especially the "new" ones with
all their "security" features that can do/prevent all kinds of normal
Unixy behavior. I'm not aware of anything that would cause this
slowdown, but then, I wouldn't, necessarily.

E.g., I wonder about some kind of system auditing of every disk access
(maybe at the filesystem level). Maybe check system directories/logs for

    normal/expected/correct output from debugging, and what is an error or
    unusual/suspicious/undesired output. Some examples might be helpful here.

I just can't say what's normal and what's not normal. It depends on
what's being done.

I systematized the two logs ("2019" vs "2021" and "x86_64-darwin"
vs. "universal-darwin") and did a diff, and saw nothing.

Evidently it would be helpful to be able to insert elapsed-time values
onto the log lines (to see where the time is being consumed), but
unfortunately I'm not going to be able to look into that any time
soon. Maybe you or someone else here would like to take that up.
I doubt it would be terribly deep. --good luck, karl.

More information about the tex-k mailing list.