Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bulk loading of text data (CSV files)
Message
 
 
To
24/12/1998 02:42:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00169303
Message ID:
00171680
Views:
33
Dean,

Screen I/O is extremely slow. Especially if you are doing ? which causes VFP to bitmap scroll the whole screen once it fills. If you are looking for decent performance of progress use something linke this instead:
with _screen
   .CurrentX = 0
   .CurrentY = 0
   .Print( SomeProgressInfo )
endwith
This will still be slower because it forces screen paints, you might only output progress every 0.1 % to keep performance up.

VFP6 is much faster with string manipulations. If you are stuck with VFP5/3 I'd just write the parse routine in a VC++ DLL that VFP could call to pull the string apart.

>Thanks for your reply. My original tests were showing that it would take about 10 hours to processs 100,000 records using fopen, fget, etc. I felt that something was wrong here, so I "played" some more. My test was simple so it should have been fast. I was printing the record to the screen (using ?) for each record read in. Guess what? That little old "print" statement (that was for debugging purposes only) was the killer. Removing the print statement made the low level file handling statements work the way I originally expected - 15 to 20 seconds total to read 120,000 records (300-400 bytes each), not 10 hours!.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform