>>Hi Jos,
>>
>>> Are you saying that if the new content is larger than the existing content that the entire new content is added to the end and the existing blocks become bloat?
>>
>>Yes. The memo file format is a comparable simple one. Content is stored in one continuous block and not split across multiple blocks. This design allows reading and writing operations to be comparable fast.
>
>OK. I have previously misunderstood it. Thanks for the clarification.
I think you're referring to a message that Fabio posted (last year?), where the scenario would go like this:
you write a memo field of n bytes, it is added
you update it to have n-m bytes, the existing space is reused
you update it to have n-m+k bytes, still less than n, the existing space is abandoned and the memo is added in new blocks, because the current length is longer than the previous.
So, no matter that the current block is large enough to hold the third version of the text, this third version is longer than the current. Fabio's trick was to pad it to the maximal length every time, so that this doesn't happen.
Fabio's technique only avoids the case when it's longer, then shorter, then a bit longer again. You may still getting memo bloat if new content is really longer than the previous content.