Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Non data bearing primary keys
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00106667
Message ID:
00107878
Vues:
27
>Chad,
>My guess is that LLFF would be slower than APPEND FROM. The main reason is that with APPEND FROM the interpreter only has one line of code to deal with. With while loop, an FGETS(), and having to parse the string you read in you have several lines of code per record you're importing. Even though VFP's interpreter is really fast, I would expect APPEND FROM to be the fastest way to do this.
>Of course, only one way to find out...

=D) I knew this was coming.

Yes Chad, I thought long and hard about low level file functions. But to be perfectly honest, I wasn't real comfortable with using them to the extent this would require at the time I started developing this app. But I did attempt to test performance once regarding APPEND FROM .. TYPE DELIMITED vs. LLFF, but my notes from 8/96 reveal I only invested like a half day in this test so I think I might of gotten a little lazy here and just stuck with what I was familiar with.

But here's my notes on testing LLFF vs. APPEND TYPE DELI:
I created a 10,000 line comma separted text file that was similar to the text files generated by these Unix Billing systems I deal with. Then I wrote a function using FGETs that would feed the file in line by line, and convert a funky date value (one not supported by SET DATE in Fox) to a real date value. I also copied out my framework's append routine into a new function, and added some complex REPLACE ALL's to do the date conversion from a character field into an extra date field. The resulting table was 15 columns wide when done with LLFF, and 16 fields wide with the append method. I ran both functions 10 times each, on the same machine, during peak network hours, and averaged the time taken on each run. I had expected to find a big difference and was figuring the same as Chad, the LLFF would prove faster. Well the results were so surprising that unfortuantely I didn't write my avg. times down and don't remember them anymore, but the last scribble in my notes is "Low Level function avg time only 4 seconds faster than Append Function Avg. So K.I.S.S."

So I stuck with Append over LLFF because I wasn't real comfortable with low level stuff and I hadn't found UT yet ;) Now granted this wasn't a test on non-data keys specifically, I was looking at handling a weird date format. But I've used this as a reference for what Josh is saying, that LLFF don't offer the great of performance improvement over APPEND FROM ... TYPE DELI. Also worth noting here, this test was before Paul Vlad taught me that when I run tests such as this I really need to close out FoxPro between each run. So there is probably a good chance I could re-run this test with what I know now and get very different results. Maybe if I get the chance though I will try a new test with generating a PK and post results.
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform