Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Documentation on 3-tier development
Message
De
25/12/2004 04:55:43
 
 
À
25/12/2004 01:46:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00971820
Message ID:
00972128
Vues:
20
>Have you tried in in VFP 9.0? It's faster.

No it isn't. The following test was run on a Dell Precision 360 (1GB RAM) using VFP8 and VFP9
OPEN DATABASE "c:\program files\microsoft visual foxpro 8\samples\northwind\northwind.dbc"
USE invoices IN 0

LOCAL lnSeconds, loXAD
lnSeconds = SECONDS()

FOR i = 1 TO 10
    loXAD = CREATEOBJECT("XMLAdapter")
    loXAD.FormattedOutput = .F.
    loXAD.PreserveWhiteSpace = .T.
    loXAD.AddTableSchema("invoices")
    loXAD.ToXML("lcXML")

    RELEASE loXAD

    loXAD = CREATEOBJECT([XMLAdapter])
    loXAD.PreserveWhiteSpace = .T.
    loXAD.LoadXML(lcXML)
    loXAD.Tables(1).Alias = [cursortmp]
    loXAD.Tables(1).ToCursor()

    RELEASE loXAD
    USE IN cursortmp
ENDFOR

WAIT TRANSFORM(SECONDS() - lnSeconds) WINDOW NOCLEAR
The results averaged roughly the same for 20 trials:

VFP8: 20.78 Seconds
VFP9: 21.22 Seconds

Now, if you remove loXAD.PreserveWhiteSpace = .T., the results increase to over 60 whopping seconds for both VF8 and VFP9
- Jeff
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform