All of lore.kernel.org
 help / color / mirror / Atom feed
* [GSoC][Project Idea] Refactor lazy-fetching in a partial clone
@ 2023-03-26 17:08 Kousik Sanagavarapu
  0 siblings, 0 replies; only message in thread
From: Kousik Sanagavarapu @ 2023-03-26 17:08 UTC (permalink / raw)
  To: git; +Cc: five231003

The term "object" below always means a blob or a tree since git doesn't
yet allow filters on commits or tags.

Whenever an object is missing in a partial clone and we check for it
or read it, we trigger a lazy-fetch depending on whether fetch_if_missing
is set to 1 or 0. Currently, this global is set to 1 everywhere and some
commands which do not want to lazy-fetch have it set to 0 internally (for
example index-pack, fetch-pack, rev-list).

The goal of this project is to look into all the commands where fetch_if_missing
is set to 1 (in which case, whenever an object is missing, a connection
is made, the object that is missing is fetched and we disconnect. This
is bad because we are fetching for each object individually and this
leads to huge performance loss) and make changes so that fetching of
objects is done in a batch. In this way, when all of commands know how
to nicely fetch objects, we can change fetch_if_missing to default to 0.

I think this can be implemented by looking for all the places in the code
where has_object_file*(), read_object_file() or really any other function
which uses oid_object_info_extended(), is used and where fetch_if_missing is
set to 1 and make the necessary and appropriate changes to either fetch
efficiently or to not fetch at all and also write the tests necessary
according to the family [1] they belong to.

The above idea is the result of the discussion on the patch

  https://lore.kernel.org/git/20230225052439.27096-1-five231003@gmail.com/

Please let me know if it is doable as a project.

Thanks

[1] https://lore.kernel.org/git/20230311025906.4170554-1-jonathantanmy@google.com/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-26 17:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 17:08 [GSoC][Project Idea] Refactor lazy-fetching in a partial clone Kousik Sanagavarapu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.