Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
radicle: separate out the start of ReadOdb
Archived fintohaps opened 2 years ago

The ReadRepository::contains method can be wasteful since it opens and ODB handle and immediately closes it, while its usage may reuqire checking multiple OIDs in a batch, e.g. in the RefsStatus calculation.

Instead, introduce a ReadOdb trait, an Odb associated type to ReadRepository, and a new method ReadRepository::odb for getting the ReadOdb type.

The use of contains in RefsStatus uses the ReadOdb instead to improve the usage performance.

ReadRepository::contains remains a part of the trait as a follow-up task.

fintohaps opened with revision 9a456c56 on base 9cdf0aa1 +77 -20 2 years ago

The ReadRepository::contains method can be wasteful since it opens and ODB handle and immediately closes it, while its usage may reuqire checking multiple OIDs in a batch, e.g. in the RefsStatus calculation.

Instead, introduce a ReadOdb trait, an Odb associated type to ReadRepository, and a new method ReadRepository::odb for getting the ReadOdb type.

The use of contains in RefsStatus uses the ReadOdb instead to improve the usage performance.

ReadRepository::contains remains a part of the trait as a follow-up task.

fintohaps pushed revision 2 63a50e75 on base 9cdf0aa1 +80 -22 2 years ago

Changes:

  • Move getting the Odb handle outside the loop for each insert.
fintohaps pushed revision 3 cf705ed5 on base 9cdf0aa1 +80 -22 2 years ago

Changes:

  • Update commit message title