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

Re: [PATCH] [RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>

From
ZheNing Hu <adlternative@gmail.com>
Date
Aug 12, 2022, 15:49 UTC
Message-ID
<CAOLTT8QfmVXHDVfWZf0U73PXOQ--ZUmm3N=a60fv_Wo_5UnqmA@mail.gmail.com>
In-Reply-To
<YvQf/xW7oohAsJct@coredump.intra.peff.net>
Jeff King <peff@peff.net> 于2022年8月11日周四 05:15写道:
Show 19 quoted lines
>
> On Tue, Aug 09, 2022 at 09:37:09AM -0400, Derrick Stolee wrote:
>
> > > Was the reason why we have "we limit to an object we already have"
> > > restriction because we didn't want to blindly use a piece of
> > > uncontrolled arbigrary end-user data here?  Just wondering.
> >
> > One of the ideas here was to limit the opportunity of sending an
> > arbitrary set of data over the Git protocol and avoid exactly the
> > scenario you mention.
>
> One other implication here is that the filter spec is sent inside of a
> pkt-line.  So the implementation here is limiting us to 64kb. That may
> sound like a lot for simple specs, but I imagine in big repos they can
> possibly get pretty complex.
>
> That would be fixable with a protocol extension to take the data over
> multiple pkt-lines.
>

This sounds very scary, a filter rules file has (more then) 64KB... If the filter is really big, I think the server will really be slow to parse it.

Show 17 quoted lines
> That said...
>
> > At this moment, I think path-scoped filters have a lot of problems
> > that need solving before they can be used effectively in the wild.
> > I would prefer that we solve those problems before making the
> > feature more complicated. That's a tall ask, since these problems
> > do not have simple solutions.
>
> ...I agree with this. It is nice to put more power in the hands of the
> clients, but we have to balance that with other issues like server
> resource use. The approach so far has been to implement the simplest and
> most efficient operations at the client-server level, and then have the
> client build local features on top of that. So in this case, probably
> requesting that _no_ trees are sent in the initial clone, and then
> faulting them in as the client explores the tree using its own local
> sparse definition. And I think that mostly works now.
>

Agree. But we have to fetch these blobs one by one after partial clone, why not reduce some extra network overhead If we can get those blobs that are *most* needed in the first partial clone, right?

Show 5 quoted lines
> Though I admit I do not keep a close watch on the status of
> partial-checkout features. I mostly always cared about it from the
> server provider angle. ;)
>
> -Peff
Thanks.
ZheNing Hu
Previous: Jeff KingNext: Jeff King
Message 6 of 9 in “[RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>”
  1. [RFC] list-objects-filter: introduce new filter sparse:buffer=<spec>ZheNing Hu via GitGitGadget, Aug 8, 2022
  2. Junio C HamanoAug 8, 2022
  3. ZheNing HuAug 9, 2022
  4. Derrick StoleeAug 9, 2022
  5. Jeff KingAug 10, 2022
  6. ZheNing HuAug 12, 2022
  7. Jeff KingAug 14, 2022
  8. ZheNing HuAug 12, 2022
  9. ZheNing HuAug 26, 2022

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.