Re: [PATCH 80/83] run-command: make dup_devnull() non static
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 8, 2016, 10:15 UTC
- Message-ID
- <CACsJy8DUcLWQ6AwyLE+CF+TxZtqDLS=82peizSf4TrZ3q=qjJg@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.20.1605080811380.4092@virtualbox>
On Sun, May 8, 2016 at 1:33 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 5 quoted lines
> The claim is that this libifies the procedure. But it makes the code > really nasty for use as a library: if this is run in a thread (and you > know that we are going to have to do this in the near future, for > performance reasons), it will completely mess up all the other threads > because it messes with the global file descriptors.
I vote one step at a time, leave multi-thread support for future. There's a lot more shared state than file descriptors anyway, at least there are object db and index access and probably a couple of hidden static variables somewhere. And I'm not sure if multi-thread really helps here. Are we really CPU-bound? If object inflation causes that (wild guess), can we just inflate ahead in some separate process and pass the result back?
-- Duy