Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xmltocursor
Message
From
03/10/2014 23:29:12
 
 
To
03/10/2014 08:26:11
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01608732
Message ID:
01608765
Views:
52
>why is xmltocursor so much slower that cursortoxml???
>
>what can I do to speed it up ???
>
>the conversion to xml takes a few seconds, the revers days!!!!!

What I've done in the past to convert large XML files made by CursorToXML is to open the file with the low level file IO, copy the header and footer into strings and then read the file in chunks, use the AT() function to find the last record end marker in the chunk, build a string using the header and footer along with the trimmed chunks, and then XMLToCursor them, remembering to use the flag to make it append the subsequent chunks to the table made by the first one.

While this does make it slower on a small file, the difference is imperceptible, and on a large file it can be orders of magnitude faster.

Ian Simcock.
Previous
Reply
Map
View

Click here to load this message in the networking platform