Microsoft KB Archive/281281

= PRB: FLUSH Command Appears Slower on Windows 95 or Windows 98 Computers =

Article ID: 281281

Article Last Modified on 5/12/2003

-

APPLIES TO


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

-



This article was previously published under Q281281



SYMPTOMS
When you use the FLUSH command to flush the buffers and save data that is located on another computer, it appears to run slowly when the user's computer has Microsoft Windows 95 or Microsoft Windows 98 as its operating system and the computer that the data is located on has Microsoft Windows NT 4.0 or Microsoft Windows 2000 Server as its operating system. When both computers use the Windows NT 4.0 or Windows 2000 operating systems, the FLUSH command appears to run much faster.



RESOLUTION
To resolve this problem, issue the FLUSH command fewer times in the loop.



MORE INFORMATION
Both sets of operating systems perform the FLUSH commands in about the same amount of time. Windows NT 4.0 and Windows 2000 operating systems seem to perform the FLUSH commands faster because they cache the FLUSH commands and then return operation to the application. (The operating system continues to issue FLUSH commands in the background.) Windows 95 and Windows 98 return control to the application only after all FLUSH commands are complete.

Steps to Reproduce Behavior
Copy and run the following code in a program (.prg) file:

* Use a Windows 95 or Windows 98 computer and open a table on a Windows USE \\ \ x=SECONDS ? &quot;Started flushing...&quot; FOR i = 1 TO 50000 FLUSH NEXT i y = SECONDS ? &quot;Flushed in&quot; + STR(y - x, 7, 3) + &quot; seconds.&quot;
 * NT 4.0 or Windows 2000 computer.

Additional query words: slow performance delay hang

Keywords: kbdatabase kbprb KB281281

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.