Change to avoid overwriting data length bytes#22
Conversation
As mentioned to me in a comment by @arj03, there's really no reason to be overwriting the length of the data since that doesn't change.
|
That looks right. The reason why I found this was that I was looking at implementing delete in browser and then realized that flumelog-aligned-offset doesn't have a del method, so I was looking at what you did here and porting that over. One thing that I noticed was that it slows down stream. How did you go about benchmarking this back then? |
I think I was just running bench-ssb in this comment, does that look right to you? I think the slightly slower streaming is probably because it has to check whether the item is all null bytes. For most messages it only looks at the first byte, but if a messages has been deleted it looks at every byte to see whether the item has been deleted. |
|
I suggested using this filtering approach. Also the views work like this. |
As mentioned to me in a comment by @arj03, there's really no reason to
be overwriting the length of the data since that doesn't change.