git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] pack-objects: prefetch objects to be packed

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Jul 21, 2020, 23:37 UTC
Message-ID
<20200721233707.1363438-1-jonathantanmy@google.com>
In-Reply-To
<xmqqh7u07e41.fsf@gitster.c.googlers.com>
Show 18 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> >>> The optimization makes sense to me if certain
> >>> conditions are met, like...
> >>> 
> >>>  - Most of the time there is no missing object due to promisor, even
> >>>    if has_promissor_to_remote() is true;
> >>
> >> I think that optimizing for this condition makes sense - most pushes (I
> >> would think) are pushes of objects we create locally, and thus no
> >> objects are missing.
> 
> Another simple thing I missed.  Why do we specifically refer to
> "push" here?  Is this codepath in pack-objects not used or less
> often used by upload-pack (which is what serves "fetch")?  
> 
> I just wanted to make sure that we are not optimizing for "push",
> trading efficiency for "fetch" off.

Ah...that's true. For "fetch" I think it's less important because the multiple roundtrips of the pack negotiation means that the packfiles are usually more specific, but this optimization will help "fetch" too. I don't think we're optimizing at the expense of "fetch" - any improvements should benefit both similarly.

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 13 in “Prefetch objects in pack-objects”
  1. 0/2 Prefetch objects in pack-objectsJonathan Tan, Jul 21, 2020
  2. 2/2 pack-objects: prefetch objects to be packedJonathan Tan, Jul 21, 2020
  3. Junio C HamanoJul 21, 2020
  4. Jonathan TanJul 21, 2020
  5. Junio C HamanoJul 21, 2020
  6. Junio C HamanoJul 21, 2020
  7. Jonathan TanJul 21, 2020
  8. Junio C HamanoJul 21, 2020
  9. Jonathan TanJul 21, 2020
  10. Junio C HamanoJul 21, 2020
  11. Jonathan TanJul 22, 2020
  12. Junio C HamanoJul 22, 2020
  13. 1/2 pack-objects: refactor to oid_object_info_extendedJonathan Tan, Jul 21, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.