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

Reinhard Kotucha reinhard.kotucha at web.de
Sun Apr 22 02:51:03 CEST 2018


On 2018-04-21 at 12:02:06 +0200, Arthur Reutenauer wrote:

 > > 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.
 > 
 >   Your conclusion may be warranted, but thatÕs a really bad
 > argument.  Reversing a programÕs behaviour after 25 years because
 > Òusers can alwaysÓ change their configuration is just gratuitous
 > and almost never a good idea.

I didn't suggest to change the bavior in any way.  Omitting
optimization will degrade performance a little bit, almost no user
will notice it but confusion is avoided in certain situations.

Activating ls-R database lookup for TEXMFHOME is't new at all.  We had
TEXMFDBS = $TEXMF (whereas $TEXMF contains TEXMFHOME) until TeX Live
2007 already.

Karl's optimization increases performance when no ls-R file is present
and the TEXMFHOME tree has to be searched.  On the other hand, if an
ls-R file exists, it will be used and performance is increased
significantly, much more than whatever can be achieved by the
filesytem search optimization code in kpathsea.

Let me explain the behavior prior to TeX Live 2007.  There was no ls-R
file by default because the installer isn't aware of users and thus
cannot create files in HOME.  As Karl already mentioned, TEXMFHOME is
not a !!-directory which means that if a file is not in ls-R, a
directory search is performed.  When a user runs texhash the very
first time, an ls-R file is created and will be used by kpathsea.  If
a user adds a file but doesn't run texhash, kpathsea will scan the
filesystem.  Hence existing files are always found, but faster with an
up-to-date ls-R file.

You might wonder why I wrote most of the previous paragraph in present
tense.  The reason is that everything I described is still present in
kpathsea and texmf.cnf, the only change made in TL-2007 was to remove
TEXMFHOME from TEXMFDBS.  I'm not convinced that this was the best
choice but no user complained about the degradation of performance so
far.

We are not discussing behavior but only performance issues and the
question whether a decrease of performance is acceptable when the
optimization code is omitted.  The main problem is that the current
code confuses users and there is no way to provide a meaningful error
message.

Karl is quite conservative in respect of changes for many very good
reasons.  When I asked for replacing .zip by .tar.lzma (now .tar.xz) I
did some tests and could provide numbers.  These numbers are
predictable.  The decrease of file size is always the same and the
amount of time needed to de-compress files does not depend on anything
else but CPU speed.  Filesystem performance is negligible in this
case.

Maesuring performance of the kpathsea optimization code is almost
impossible because the filesystem is involved. Performance depends on
the physical media and thus everybody would report different numbers,
depending on whether the file system is on a rotating disk, an SD
card, a USB-stick, or even a RAM disk.  Everything is possible
nowadays and thus nothing is predictable.

The only thing which is predictable is that an ls-R database lookup is
always much more efficient than everything else.  In my previous mail
I only suggested to disable the optimization code in kpathsea.

But the more I think about it, I'm convinced that the pre-TL-2007
setup should be reinstated.  The change was made because a single user
reported a problem which nobody else could reproduce.  Nobody made the
slightest attempt to determine what actually caused the problem.

The old setup was perfect and it's a pity that it was changed for no
good reason.

Karl wrote:

 > I don't like the idea of making everyone pay a price to support a
 > rare occurrence.

Don't we pay a much higher price if database lookups are disabled by
default (TEXMFHOME removed from TEXMFDBS)?  

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