[tex-live] Patch for "texdoc -s" to use the ls-R database

George N. White III gnwiii at gmail.com
Fri Jun 1 20:04:08 CEST 2007

On 6/1/07, Frank Küster <frank at kuesterei.ch> wrote:

> karl at freefriends.org (Karl Berry) wrote:
> >     call kpsewhere instead of kpsewhich in this case.
> >
> > I didn't even know kpsewhere existed.  It should never have been
> > implemented, it seems to me.  It is what kpsewhich --all did, but
> > apparently that got broken at some intervening time.  Sigh.
> Any idea why it stopped working?
> >     grep only through the doc parts of ls-R
> >
> > If you mean extract out the doc subtrees only, maybe
> > filter first with sed -n '/^\.doc/,/^$/p' ?
> sed -n '/^\.\/doc/,/^$/ p'
> seems to work.

TDS says system/platform specific docs can be elsewhere, e.g.,
  texmf/vms/help (or, more likely, texmf/windujour/help for .chm files).

I suppose texdoc could always be configured to add such directories
if anyone discovers the need and actually has sed, etc.

> >     With the old implementation (texdoc -s lm), I get
> >
> > With the texdoc in TL2007, texdoc -s lm takes 7sec on the first run for
> > me.  (Much less than 1sec on the second run, since it's all in disk
> > cache, presumably.)

Think about people running tl in a linux VM or native linux on a P3

On my office P3 it took 45 s. for the first search, 11 for the 2nd
using the original
TL2007 texdoc.  I tend to avoid texdoc in favor of locate.

"texdoc -S lm-info" is much faster than the old version, but "texdoc -S lm" is
slower.  On the SGI at work (after editing "/bin/sh" --> /bin/ksh" and
"egrep -q"
--> "egrep -s") :

$ time texdoc -s lm
real    0m4.318s
user    0m0.095s
sys     0m1.021s

$ time texdoc -S lm
Directories that match lm:

Files that match lm
real    0m7.269s
user    0m4.571s
sys     0m1.351s

The difference is even greater for linux on P-III.

On a faster machine I tend to use locate or the full-text
index/search tools (beagle), so texdoc gets ignored.

> That's really a big difference.  I hope it's not my harddisk which
> causes this, like some DVD media...

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the tex-live mailing list