Chuck Lever <[EMAIL PROTECTED]> writes:
> Junio C Hamano wrote:
>> Chuck Lever <[EMAIL PROTECTED]> writes:
> once the list implementation is working well, i plan to go back and
> replace it with something more sophisticated which can perform
> insertion, deletion, and searching efficiently.
Well, what I wanted to see was if we can get away without
introducing more sophisticated data structures, which would add
>> I haven't timed it like you did, but my gut feeling is that the
>> most wastage during the merge is coming from having to move
>> entries because we "insert into" or "remove from" the same
>> active-cache array.
> the merge actually replaces entries in place, so it is already fairly
> efficient. the wastage in the merge case arises from the many list
> insertions done by read_cache, all of which involve moving some of the
> active cache array.
Yes, the reading of three trees upfront is probably the culprit
in your case, and I think that is something Daniel's read-tree
rewrite can help. I still see some remove_cache_entry_at()
there because it works on the active_cache in place, but the
structure of the new code should be much easier to make the kind
of modification we are talking about.
>> I think what Daniel
>> did to read-tree recently, still in the proposed updates branch,
>> would make this kind of change far easier to implement.
> as i'm new to git development, i wasn't aware of the proposed branch. i
> will see if i can take a look (or send me a pointer to the list archives
> if he has posted them here).
If you already have a local copy of git.git repository you work in:
git fetch http://kernel.org/pub/scm/git/git.git +pu:refs/heads/ko-pu
git checkout -f ko-pu
git clone http://kernel.org/pub/scm/git/git.git peek
git checkout -f pu
The interesting change from the mainline is in read-tree.c
You can browse http://kernel.org/git/ and see commitdiffs in the
"pu" branch if you are not interested in slurping the whole
proposed updates branch.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html