[tex-live] FInding locally installed packages in different environments

Reinhard Kotucha reinhard.kotucha at web.de
Fri Apr 20 23:25:23 CEST 2018


On 2018-04-19 at 22:08:01 GMT, Karl Berry wrote:

 >     I still find it extremely strange that this should be "irremediable" ...
 > 
 > It is not technically "irremediable". As I commented in
 > kpathsea/elt-dirs.c more than 25 years ago, it is perfectly easy to
 > avoid the optimization of a directory having 2 links => leaf => don't
 > check symlinks. Non-Unixy systems don't have that optimization
 > possibility, for instance.
 > 
 > However, the downside of turning off the optimization is that every
 > entry of every (heretofore leaf) directory will be stat(2)d. This is an
 > expensive operation, even on today's computers, because all that data
 > won't be in the disk/cpu caches, and will get promptly thrown away.
 > 
 > Having symlinks to outside dirs seems relatively rare to me. I don't
 > like the idea of making everyone pay a price to support a rare
 > occurrence.  Creating an empty directory in a directory with symlinks
 > that should be followed seems like a reasonable workaround to me.
 > 
 > However ... I guess the counterargument is that this whole optimization
 > only happens in non-!! directories like TEXMFHOME, and those are most
 > likely small, so then it doesn't matter how much extra work the
 > searching does.
 > 
 > So, I don't know. -k

Hi Karl,
maybe it's better to drop the optimization because only TEXMFHOME is
concerned which can be easily added to TEXMFDBS by users if
performance matters.

In the past there had always been an ls-R file in TEXMFHOME and users
knew that they had to run texhash after adding a new file.  You
removed !! from TEXMFHOME when Don Knuth reported that whenever he
invoked tex, the format file was created again and again.  Removing !!
from TEXMFHOME was a quick workaround which made Don Knuth happy.  But
the actual problem was that fmtutil didn't update the ls-R file.

One of your arguments at this time was that the TEXMFHOME tree is
usually quite small and the absence of an ls-R file is acceptable.
Computers are much faster now and I'm convinced that your assumption
is still true nowadays even if optimization is turned off.

My suggestion is to turn optimization off.  Everything then still
works as before with a small loss of performance.  But if performance
really matters, users can still activate ls-R database lookup for
TEXMFHOME at any time.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the tex-live mailing list