Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FPT bloat
Message
From
12/12/2013 11:40:16
 
 
To
12/12/2013 09:15:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01589991
Message ID:
01590024
Views:
72
>>>Hi all,
>>>
>>>we have a file on the customer site that hits the 2gb limit every so often. The dbf and cdx are fine, it is the FTP that hits the limit. when this happens the ftp seems to clear itself out and hold no data. I can restore from a backup and they might lose half a days details, not good but it's something. What gets me is that when I restore from a backup and pack the file the FTP shrinks to 150-180mb. I don't lose any data, there just seems to be huge bloat in the file. I use the insert command to populate the file but it's a log file, it is never updated or modified after the fact. Any ideas what might be causing this?
>>>
>>
>>To slow down growth of the FPT, never do code like this:
>>
>>
>>REPLACE MyMemo WITH MyMemo + "more info"
>>REPLACE MyMemo WITH MyMemo + "even more info"
>>REPLACE MyMemo WITH MyMemo + "still more info"
>>etc.
>>
>>Instead, do it like this (I'm assuming there'd be a loop or something actually building up the string to add):
>>
>>
>>cNewInfo = ''
>>cNewInfo = m.cNewInfo + "more info"
>>cNewInfo = m.cNewInfo + "even more info"
>>cNewInfo = m.cNewInfo + "still more info"
>>REPLACE MyMemo WITH MyMemo + m.cNewInfo
>>
>>
>>Each time you REPLACE into the memo field, you discard the old data and put new data elsewhere. (That's not exactly right, but it's the right mental model to have.)
>>
>>Tamar
>
>But she said .... but it's a log file, it is never updated or modified after the fact.
>
>So your comments about REPLACE don't seem relevant.

If it's built that way during its initial load.

A PACK MEMO taking it back to 150-180 MB indicates there is a large amount of discarded memo data present.

I'd also suggest analyzing the data and see if there's a still-usable maximum under 250 characters. If the data never exceeds that, using a Memo is overkill.

Chris.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform