Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLDOM parsing speed is slow
Message
From
18/10/2007 14:52:57
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
XMLDOM parsing speed is slow
Miscellaneous
Thread ID:
01261916
Message ID:
01261916
Views:
65
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
Next
Reply
Map
View

Click here to load this message in the networking platform