Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How get the Number of Lines from a text file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00451983
Message ID:
00453126
Views:
96
>>>>Yes, this is probably the source of problem. It is on Network drive. If I have time, I'll try the test with file on local drive.
>>>
>>>You probably saturated your network with tens of thousands of requests for little "nibbles" of the great big file.
>>>
>>>Be careful, or the netadmin "police" will get you ;-)
>>
>>Well, I just tested on the local drive, and it's still very slow...
>
>Are you using a cursor or a file with Exclusive? If you're trying to APPEND to a shared file, it really slows things down. (Then again, this might be the same problem you were having trying to download from my web site.)

Hi Barbara,

You probably haven't followed the thread. I compared two approaches: one with append to cursor SDF (cursor with 1 character field) and another approach with low-level functions (fgets() in a do while !feof(lnHandle)). Append from took only 5 min. for 382MB comma-delimited file (~5mln. records). Low-level approach was too slow. I added ability to interrupt by ESC, so low-level method processes 10000 rec. in 18 sec., while APPEND processes about 40 times more (don't remember exact numbers). Therefore I was not right, when I thought, that low-level approach would be the fastest. I'll post my test program tomorrow, if you're interested.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform