We have a couple of patch series we’re working on (ObjectDB/Read-Object, Watchman integration) where we could use the ability to have a background process running that can accept multiple commands thus avoiding the overhead of spawning a new process for every command.
The ability to do this was added in: Commit edcc85814c ("convert: add filter.<driver>.process option", 2016-10-16) keeps the external process running and processes all commands but it is integrated into the convert code. This patch series takes the code from convert.c and refactors it into a separate “sub-process” module so that we can centralize and reuse this logic in other areas. Once the code was refactored into sub-process, convert.c was updated to use the new module. Ben Peart (3): pkt-line: add packet_write_list_gently() sub-process: refactor the filter process code into a reusable module convert: use new sub-process module for filter processes Documentation/technical/api-sub-process.txt | 55 ++++++++++ Makefile | 1 + convert.c | 154 +++++----------------------- pkt-line.c | 19 ++++ pkt-line.h | 1 + sub-process.c | 113 ++++++++++++++++++++ sub-process.h | 46 +++++++++ 7 files changed, 259 insertions(+), 130 deletions(-) create mode 100644 Documentation/technical/api-sub-process.txt create mode 100644 sub-process.c create mode 100644 sub-process.h -- 2.12.0.gvfs.1.42.g0b7328eac2