Closed tych0 closed 1 year ago
related: right now MetadatBlob::find_inode
parses the entire inode list, and then does a subsequent on-disk binary search to find the real inode. That sucks and this would fix it :)
possible alternative: https://github.com/bincode-org/bincode
The find_inode
no longer reads the entire inode list into memory as of https://github.com/anuvu/puzzlefs/pull/49
Hey @tych0, did you have any alternatives to cbor in mind for the puzzlefs wire format?
Not really. Maybe something completely custom is best in terms of filesystem size, but also annoying to implement. Protobuf? Capnproto? There isn't really precedent for any standard binary format in the kernel that I'm aware of, unfortunately.
My understanding is that capnproto has pretty good encoding/decoding optimizations over e.g. protobuf, so it seems like a reasonable suggestion.
Right now we're using serde_cbor to serialize things, and e.g. in structures it puts essentially a json map with a string of the field name in. That's useful to get us off the ground, but we should implement a real serialization for our objects so we get smaller representations of them.