Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo Bloat
Message
From
28/08/2007 13:20:18
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
28/08/2007 05:21:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01250840
Message ID:
01250959
Views:
20
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform