Re: [PATCH v1 0/3] [RFC] Speeding up checkout (and merge, rebase, etc)
From: Duy Nguyen <hidden>
Date: 2018-07-26 16:35:47
On Wed, Jul 25, 2018 at 10:56 PM Ben Peart [off-list ref] wrote:
On 7/24/2018 11:33 AM, Duy Nguyen wrote:quoted
On Tue, Jul 24, 2018 at 6:20 AM Jeff King [off-list ref] wrote:quoted
At least that's my view of it. unpack_trees() has always been a terrifying beast that I've avoided looking too closely at./me nods on the terrifying part.quoted
quoted
After a quick look at the code, the only place I can find that tries to use cache_tree_matches_traversal() is in unpack_callback() and that only happens if n == 1 and in the "git checkout" case, n == 2. Am I missing something?So we do not actually use cache-tree? Big optimization opportunity (if we can make it!).I agree! Assuming we can figure out the technical issues around using the cache tree to optimize two way merges, another question I'm trying to answer is how we can enable this optimization without causing back compat issues?
If it works as I expect, then there's no compat issues at all (exactly like the diff_index_cached optimization we already have). We simply find a safe shortcut that does not add any side effects. -- Duy