finding locations of many files via kpse

Deyan Ginev deyan.ginev at gmail.com
Tue Jul 2 12:58:24 CEST 2024


Hi Norbert,

>From my limited testing the fastest option is the last one in your list -
linking to libkpathsea from a custom executable in a low-level programming
language of choice.

That was the reason for the (still experimental) rust-kpathsea wrapper
getting created:
https://github.com/dginev/rust-kpathsea

Speed is not always the deciding factor of course.

Btw, there is a gotcha for your first approach that people should be aware
of: while found names get paths returned, missing names are simply elided.
Which means more work to figure out which returned path corresponds to
which input.

For example these calls produce identical results:

$ kpsewhich foo.sty pgf.sty bar.sty tikz.sty baz.sty
$ kpsewhich pgf.sty foo.sty bar.sty baz.sty tikz.sty
$ kpsewhich foo.sty pgf.sty tikz.sty bar.sty  baz.sty

Greetings,
Deyan


On Tue, Jul 2, 2024 at 6:16 AM Jonathan Fine <jfine2358 at gmail.com> wrote:

> Hi Norbert
>
> Here's something that might help, depending on the numbers. On a high
> speed device, eg NVMe, populate a copy of the file system, except all files
> are empty.
>
> With kind regards
> Jonathan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20240702/eee567be/attachment.htm>


More information about the texhax mailing list.