finding locations of many files via kpse

Norbert Preining norbert at preining.info
Tue Jul 2 13:30:13 CEST 2024


Hi Deyan,

nice to see you here ;-) Thanks for your answer.


> From my limited testing the fastest option is the last one in your list -

Yes, I am aware of that. But also least in convenience ;-)

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

What is the state of it? Instead of writing my own C-code, I could look
into using your rust wrapper, but AFAIS there is no cmd line interface
like asking for many files.

> 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.

Yes. I still think it might be quite fast. A first run checking all
files, keeping the full response in memory, then checking for missing
files.

I think the kpsewhich binary is probably the fastest way by itself.
Maybe I look into kpsewhich and an options to output a different format
where missing files are easily distinguished.


@Jonathan Fine:
> > 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.

And how would help that?

Best regards

Norbert

--
PREINING Norbert                              https://www.preining.info
arXiv / Cornell University   +   IFMGA Guide   +   TU Wien  +  TeX Live
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the texhax mailing list.