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.
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.
Changes:
- Move getting the Odb handle outside the loop for each
insert.
Changes:
- Update commit message title