Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Side by side comparison (strings & local data)
Message
From
29/12/2003 09:46:40
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/12/2003 09:17:29
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00861648
Message ID:
00862485
Views:
42
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform