Open mpl opened 7 years ago
Relatedly, and as another requirement to close this issue, the allocation at:
https://camlistore-review.googlesource.com/c/camlistore/+/8326/13/pkg/search/query.go#1971
should go away as well.
https://camlistore-review.googlesource.com/c/camlistore/+/8326 updated with the no allocation improvement.
https://camlistore-review.googlesource.com/c/camlistore/+/9866 left todo.
In pkg/search/query.go (https://camlistore-review.googlesource.com/c/camlistore/+/9866/12/pkg/search/query.go) , func (bc *BloRefConstraint) blobMatches
we have:
brs := br.String() , which allocates.
since blobMatches is (currently) run against all share claims when doing a request about claim shares, it could be expensive. And it gets even worse if we end up using BloRefConstraint for even more generic queries (e.g. that run blobMatches against all meta blobs).
We should find a way to either move that allocation up in the caller chain (i don't see how), or find a way to get the blob ref hash without allocating.