Microsoft KB Archive/176483

= Computers that have lots of RAM installed seem to more slowly process data in Visual FoxPro =

Article ID: 176483

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Visual FoxPro 9.0 Professional Edition
 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q176483



SYMPTOMS
Sometimes when you manipulate a table with certain FoxPro commands, the record counter on the status bar pauses or stops for long periods of time. The hard drive continues to process information. This problem is more noticeable on faster computers that have large amounts of RAM installed.



RESOLUTION
Set the foreground buffer of SYS(3050) to a smaller number. Here's an example: =SYS(3050,1,10000000) && Sets the foreground buffer to 10 million && bytes.



STATUS
This behavior is by design.



MORE INFORMATION
Using the commands COPY, APPEND, DELETE, INDEX, PACK or SQL-SELECT on a large table in Visual FoxPro causes long pauses while the data is being manipulated. The hard drive continues processing the data, but Visual FoxPro seems to be inactive. This happens because computers that have large amounts of RAM and are running Windows 95 or Windows NT give Visual FoxPro a large amount of buffered memory to use. This memory is composed of RAM and physical hard drive space. When FoxPro writes data into memory, large temporary files are created. When they are written to the virtual memory (the hard drive), that memory is always slower. Using a smaller amount of foreground buffer memory with SYS(3050) makes Visual FoxPro use only the RAM memory, which is faster. Reducing the foreground buffer size has eliminated the long delay in most situations.

Steps to reproduce the behavior
 Use a computer with 64 MG of RAM or more, Visual FoxPro, and a table that contains 2 million or more records. Open the table, issue a SET STATUS BAR ON, and a COPY TO test in the FoxPro Command window. Watch the record counter on the status bar as it starts counting the copied records. After a while, the counter stops but the hard drive continues to process data. Later, the record counter starts counting again and then pauses after doubling the last record count. Press the ESC key after watching this behavior, and type the following in the FoxPro Command window:

=SYS(3050,1,10000000) && The 10 million number can be changed to                               && suit individual situations.

 Issue a COPY TO test command again and note that the counter does not pause as long this time.</ol>

<div class="references_section">