Eric Wong <e@xxxxxxxxx> writes: > Cool, I'll look into it and probably combining the approaches. > Optimizations often have a snowballing effect :) > >> But anyway, that's a much bigger improvement than what you've got here. >> It does still require two write() calls, since you'll get the object >> contents as a separate buffer. But it might be possible to teach >> object_oid_info_extended() to write into a buffer of your choice (so you >> could reserve some space at the front to format the metadata into, and >> likewise you could reuse the buffer to avoid malloc/free for each). > > Yeah, that sounds like a good idea. > >> I don't know that I'll have time to revisit it in the near future, but >> if you like the direction feel free to take a look at the patch and see >> if you can clean it up. (It was written years ago, but I rebase my >> topics forward regularly and merge them into a daily driver, so it >> should be in good working order). > > Thanks. I'll try to take a look at it soon. Thanks, that's an exciting direction to go in.