Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Side by side comparison (strings & local data)
Message
De
29/12/2003 09:46:40
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/12/2003 09:17:29
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00861648
Message ID:
00862485
Vues:
41
Walter,
I had already taken care of some of it + put some to match C# output but simply missed there was .T. in textmerge :)
StartTime = SECONDS()
SELECT * FROM testcursor INTO CURSOR TEST

=AFIELDS(laFields, "Testcursor")

cString = Chr(13) + Chr(9) + "<CLIENT>" + Chr(13)
FOR nT = 1 TO ALEN(laFields,1)
	cString = m.cString + Chr(9) + Chr(9) + ;
           "<"+laFields(nT,1)+">%%"+laFields(nT,1)+"%%</"+;
           laFields(nT,1)+">" + Chr(13)
ENDFOR
cString = cString + Chr(9) + "</CLIENT>"

SET TEXTMERGE DELIMITERS TO "%%","%%"
SET TEXTMERGE TO "cxml.txt" noshow
SET TEXTMERGE ON 

\\<TEST>
SCAN
	TEXTMERGE(m.cString)
ENDSCAN
\</TEST>

SET TEXTMERGE OFF
SET TEXTMERGE TO

cXml = FILETOSTR("cxml.txt")
?SECONDS() - StartTime
This version (removing .T. from textmerge only) has a timing of 9-10 secs.
Cetin

>>Hi Walter,
>>I tried your version and with repeated calls it has timing around 17-26 secs.
>
>Hmmm, I think there are some other circumstances which make up the difference. Are you referring to Re: Side by side comparison (strings & local data) Thread #861648 Message #861698
>
>My example seems to be about twice as fast as this when testing it with various cursor with different length and width.
>
>Can you put a SET CONSOLE OFF at the beginning (so it does not output the result to the display) and remove the .T. parameter from the TEXTMERGE(cString,.T.) and check the results again ?
>
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform