Re: [PATCH v5 05/15] odb: move MRU list of packfiles into `struct packfile_store`
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Sep 17, 2025, 21:59 UTC
- Message-ID
- <hvdgtjrfimowgsvshgt7dxbdbx6qxtuyfq5ylhgrfmfsymx7f7@gy4aazvvubk6>
- In-Reply-To
- <20250915-b4-pks-packfiles-store-v5-5-d6340350934f@pks.im>
On 25/09/15 10:54AM, Patrick Steinhardt wrote:
Show 10 quoted lines
> The object database tracks the list of packfiles in most-recently-used > order, which is mostly used to favor reading from packfiles that contain > most of the objects that we're currently accessing. With the > introduction of the `struct packfile_store` we have a better place to > host this list though. > > Move the list accordingly. > > Signed-off-by: Patrick Steinhardt <ps@pks.im> > ---
[snip]
Show 5 quoted lines
> @@ -1035,7 +1034,6 @@ void odb_clear(struct object_database *o) > free((char *) o->cached_objects[i].value.buf); > FREE_AND_NULL(o->cached_objects); > > - INIT_LIST_HEAD(&o->packed_git_mru);
Now that the mru list lives in `struct packfile_store`, it cleanup automatically gets handled via packfile_store_free(). Makes sense.
> close_object_store(o); > packfile_store_free(o->packfiles); > o->packfiles = NULL;
I quite like all of the reorganization in this series so far. :)
-Justin