Commit Briefs
dont "use lib ." in perl; resolve modules normally
fix gotmarc(1) to set PERL5LIB when running in-repo however to load the right GotMArc.pm.
resolve `mexp' via $PATH
now gotmarc sets the PATH so we don't have to hardcode the path anymore.
build a cache of hashes for each thread
The idea is to use this cache to spot changed threads and re-export all the mail of the threads that changed. This will allow to add thread navigation hints on each exported mail and have them up-to-date. This makes the "skip if already exported" logic in mexp redundant and incomplete. pe will decide whether to export or not, and mexp blindly do the work.
pe: restrict pledge
the children are pre-forked, so at runtime only "stdio" is needed.
refactor the parsing into the module
change the mscan format string to siplify the parsing, and refactor the parsing code into the module for reuse. pe is an exception in that it doesn't care about the format string, it just need to decide if the current line starts a new thread or not, that's why it doesn't use the newly introduced `parse'. The new format simplifies pe too though.
parallelize exporting
mexp is the slowest part of the pipeline. Try to speed it up by paralellizing it. this adds a `pe' scripts that sits in front on N mexp childs and dispatch threads to them, while still outputting the unchanged lines for mkindex. Unscientific testing has shown that this effectively reduces the time for a full export, even if not linearly. (4 jobs cut the time in half, 8 jobs was just barely faster)