Re: git-status performance with submodules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 01, 2019 at 10:50:29PM -0800, Junio C Hamano wrote:

> But the way "git status" code is structured, it probably takes a bit
> of preparatory refactoring.  If I recall correctly, it walks each
> path in the index in the superproject and notes how the file in the
> working tree is different from that of the index and the HEAD, under
> the assumption that inspection of each path is relatively cheap and
> at the same cost.  You'd first need to restructure that part so that
> inspecting groups of index entries can be sharded to separate
> subprocesses while the parent process waits, and have them report to
> the parent process, and let the parent process continue with the
> aggregated result, or something like that.

There's some prior art for this approach in git-checkout, where we have
a similar problem with latency of filters (e.g., for LFS). There the
individual status for a path becomes a tri-state: success, error, or
deferred. And then we collect the results from the deferred ones in a
loop.

I think (but didn't look carefully) that this could be slotted into the
diff code pretty easily. After the tree-level diff we have a queue of
candidates in memory. At that point we should be able to kick off a
process in parallel for each submodule, then wait for them all to finish
before proceeding. Maybe even as a stage of diffcore_std(), but I'm not
sure.

(Hand-wavey, I know, but just trying to point interested folks in the
right direction).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux