Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP slowdown after processing large amounts of data
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01182599
Message ID:
01183459
Views:
22
Thanks, Aleksey. Is there a rule of thumb for the optimal 3050 setting or is this done via experimentation?

>Hi Rassell,
>
>Is the process of closing the form also closes the tables? Closing tables may cause some delays due to the following reasons:
>1) When a table opened in exclusive mode is modified, VFP doesn't write the changes to disk right away. It is possible that the changes are sitting in the cache up to the point when the table is being closed and that is when VFP starts really writing them to disk. To avoid this affect, you may want to execute FLUSH FORCE periodically.
>
>2) Cached data occupy a lot of pages, VFP needs to release memory for all of them.
>
>In general, when a lot of memory is allocated for VFP file cache (see SYS(3050) function), VFP may consume all that memory and then all subsequent read operations can slow down. This happens because in order to read a new page, VFP has to find a page that it can retire. The process that chooses which page should be retired can take some time when it needs to scan through a lot of pages. The more pages are cached, the longer it may take. Therefore, SYS(3050) should be set to some optimal value to allocate enough memory, but not too much. On computers with a lot of RAM, default setting may be too big. Also, it makes sense to close tables that won't be used in the future and periodically purge file cache for tables that are not going to be extensively used in the near future (SYS(1104) allows purge cache for all tables or per work area). This will free some memory and VFP won't have to retire pages as it reads.
>When an app is reading different pieces from a huge file (for example, SCAN ENDSCAN), this on itself may fill up the cache. And the cache filled up with too many pages of almost the same "age" is the worst scenario. Again, an optimal SYS(3050) setting and/or SYS(1104) function is you friend.
>
>Thanks,
>Aleksey.
eCost.com continues to rip people off
Check their rating at ResellerRatings.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform