go-car icon indicating copy to clipboard operation
go-car copied to clipboard

Indexes don't take advantage of performant structure

Open willscott opened this issue 3 years ago • 3 comments

The common form of Index introduced in Car V2 is to lay out the CIDs in the car in a sorted table that can be quickly walked through with a binary search.

We should attempt to optimize not fully copying the index into memory when loading a car, and just doing spot reads from the index. This can for large cars avoid a copy of hundreds of megs per individual block read.

willscott avatar Jan 20 '22 08:01 willscott

Dupe of https://github.com/ipld/go-car/issues/243 or https://github.com/ipld/go-car/issues/95, perhaps. We already have multiple issues that all boil down to: we should be able to consume some index formats directly from disk.

mvdan avatar Jan 20 '22 08:01 mvdan

yep, happy to dupe, maybe this is more trying to indicate that this remains one of our expected performance bottle necks that we shouldn't lose track of

willscott avatar Jan 20 '22 09:01 willscott

Would be GREAT to have for https://github.com/filecoin-project/dagstore/pull/116.

aarshkshah1992 avatar Jan 21 '22 14:01 aarshkshah1992