Commit Graph

11 Commits

Author SHA1 Message Date
Edward Thomson
4282cbd6d8 Merge remote-tracking branch 'main' into mempack_empty 2024-12-09 22:38:29 +00:00
Edward Thomson
4bb69b0827 odb_mempack: use an out param 2024-12-09 22:36:10 +00:00
Edward Thomson
338ceb93b6 Improve documentation 2024-11-26 21:44:09 +00:00
Vladyslav Yeremeichuk
b190162f3e Add the ability to get the number of objects in mempack
Implement git_mempack_object_count, which returns the number of
objects in mempack and -1 on error.
2024-10-22 13:58:10 +03:00
Vladyslav Yeremeichuk
d1be60bbe8 Add the ability to check if a mempack is empty
Implement git_mempack_empty, which returns 1 if the mempack is empty
and 0 otherwise.
2024-10-21 22:42:56 +03:00
Robert Hensing
f9c35fb509 Add git_mempack_write_thin_pack
Unlike existing functions, this produces a _thin_ packfile by
making use of the fact that only new objects appear in the
mempack Object Database.

A thin packfile only contains certain objects, but not its whole
closure of references. This makes it suitable for efficiently
writing sets of new objects to a local repository, by avoiding
many small I/O operations.

This relies on write_pack (e.g. git_packbuilder_write_buf) to
implement the "recency order" optimization step.

Basic measurements comparing against the writing of individual
objects show a speedup during when writing large amounts of
content on machines with comparatively slow I/O operations,
and little to no change on machines with fast I/O operations.
2024-09-27 12:39:05 +02:00
Edward Thomson
82050fa1be mempack functions: return an int
Stop returning a void for functions, future-proofing them to allow them
to fail.
2020-01-24 15:12:56 -06:00
Etienne Samson
29afb2579b docs: fix incorrect codeblock on output 2018-05-07 21:50:38 +02:00
Adrián Medraño Calvo
d23ce18710 odb: export mempack backend
Fixes #4492, #4496.
2018-01-22 11:55:28 +01:00
Will Stamper
b874629b2d Spelling fixes 2014-12-04 21:06:59 -06:00
Vicent Marti
6105d59707 In-memory packing backend 2014-03-26 18:17:08 +01:00