Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLDOM parsing speed is slow
Message
De
18/10/2007 14:52:57
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
XMLDOM parsing speed is slow
Divers
Thread ID:
01261916
Message ID:
01261916
Vues:
67
I have a VFP program that loads a 5.9MB XML file into an instance of XMLDOM. In one part of the code I have a loop that builds a string that eventually looks something like,

"INSERT INTO CSRJUNK (F1, F2, F3) VALUES ('TEST1', 'TEST2', 'TEST3')"

This string is then macro executed to do the actual record insertion. The syntax to build part of the string is:
FOR m.li = 0 TO m.liNumDesc-1
    m.lcmd = m.lcmd + ["] + oChildNode.ITEM(m.li).TEXT + [",]
ENDFOR
This loop executes 63000 times and takes close to 8 minutes to complete. I've checked this using a Coverage Profiler tool. I believe that the bottleneck is the oChildNode object. Somehow VS2005 manages to load it very quickly.

Can anyone suggest if it can be sped up and how?

TIA
Mike
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform