attic-labs / noms

The versioned, forkable, syncable database
Apache License 2.0
7.45k stars 267 forks source link

Sync: avoid recompressing chunks #3753

Open ghost opened 6 years ago

ghost commented 6 years ago

This is currently a layering violation, but just to observe: it's kind of a waste that we re-encode every block just after we decoded it.

Abstractly, it might make sense to handle compression outside of NBS, which would allow this. It would also maybe allow (at least in this case) for fewer allocations, since the only reason here to decode is to WalkRefs, but we could do that to a scratch area.