Closed sphuber closed 4 years ago
Indeed, thanks! However since it's expensive, I'd probably add has_objects
instead, that gets a list of hash keys.
I implemented the bulk method in #47. For simplicity, for now I still resort, in the end, to opening files, as the logic to avoid to do so is relatively complex. I add a performance test, so later we can decide if we need to improve performance (see #48). But at least the bulk method will open each pack file only once, so if there are many objects to check and they are mostly packed, this already gives a very nice performance boost.
It would be a useful shortcut method to determine whether an object is contained within a given container.