Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Side by side comparison (strings & local data)
Message
De
27/12/2003 17:08:25
 
 
À
27/12/2003 14:32:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00861648
Message ID:
00862279
Vues:
16
Hi Dragan,

If you want to pull the neck to the turtle, you can use EXECSCRIPT().

I compare these :
* A)
SCAN
	lcXML = m.lcXML + "<CLIENT>"
	FOR f = 1 TO FCOUNT()
		lcXML = m.lcXML + "<" + FIELD(m.f) + ">" + ;
			TRANSFORM(EVALUATE(FIELD(m.f))) +;
			"</" + FIELD(m.f) + ">"
	ENDFOR
	lcXML = m.lcXML + "</CLIENT>"
ENDSCAN

* B)
Set Textmerge to memvar lcText noshow
Set Textmerge delimiters to "|"
Set Textmerge on
\local lcXml,f
\	lcXML ="<CLIENT>"
	FOR f = 1 TO FCOUNT()
\		lcXML = m.lcXML + "<|FIELD(m.f)|>" +	TRANSFORM(|FIELD(m.f)|) + "</|FIELD(m.f)|>"
	ENDFOR
\	lcXML = m.lcXML + "</CLIENT>"
\return m.lcXml
Set Textmerge to
StrToFile(m.lcText, "runner.prg")
Compile runner.prg
SCAN
	lcXML = m.lcXML + runner()
ENDSCAN

* C)
SET TEXTMERGE DELIMITERS TO "|"
SET TEXTMERGE TO MEMVAR sCommand NOSHOW
SET TEXTMERGE ON
\ SCAN
\ lcXML = m.lcXML + "<CLIENT>" ;
FOR f = 1 TO FCOUNT()
	\ + "<|FIELD(m.f)|>" + TRANSFORM(|FIELD(m.f)|) + "</|FIELD(m.f)|>" ;
NEXT
\ + "</CLIENT>"
\ ENDSCAN
SET TEXTMERGE TO
=EXECSCRIPT(M.sCommand )

* 1000 cycles for a 132791 string result from a VCX table
* A :  66 comp/s
* B : 107 comp/s
* C : 175 comp/s 
Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform