]> Sergey Matveev's repositories - public-inbox.git/commit
spawn: use ~/.cache/public-inbox/inline-c if writable
authorEric Wong <e@yhbt.net>
Mon, 11 May 2020 04:27:36 +0000 (04:27 +0000)
committerEric Wong <e@yhbt.net>
Tue, 12 May 2020 06:15:51 +0000 (06:15 +0000)
commite28abc96d9178ad59ca8563bf410c7f293b96321
tree8056c83a6e42855c95dbdcf200c8ae02d73e64e6
parenta91871ec6b607d73502ee447af8ccc9e4bfe5098
spawn: use ~/.cache/public-inbox/inline-c if writable

Despite several memory reductions and pure Perl performance
improvements, Inline::C spawn() still gives us a noticeable
performance boost.

More user-oriented command-line programs are likely coming,
setting PERL_INLINE_DIRECTORY is annoying to users, and so is
is poor performance.  So allow users to opt-in to using our
Inline::C code once by creating a `~/.cache/public-inbox/inline-c'
directory.

XDG_CACHE_HOME is respected to override the location of ~/.cache
independent of HOME, according to
https://specifications.freedesktop.org/basedir-spec/0.6/ar01s03.html

v2: use "/nonexistent" if HOME is undefined, since that's
the home of the "nobody" user on both FreeBSD and Debian.
lib/PublicInbox/Spawn.pm