function BigXMLTest( n ) oOleDb = CreateObject("OleDbFox.Utils") oRecordSet = CreateObject("ADODB.Recordset") close databases all Erase "x1.xml" Erase "tmp.xml" create cursor x1 ( i1 i, c1 c(10), t1 t, i2 i ) for i = 1 to n insert into x1 values ( i, str(i), datetime(), int( rand() * 100000 ) ) endfor ? n i = seconds() cursortoxml( "x1", "x1.xml", 1, 0 + 512, 0, "1" ) ?? seconds() - i i = seconds() oOleDb.CursorToRs(oRecordSet) oRecordset.Save("tmp.xml", 1) oRecordset.Close() ?? seconds() - i close data all i = seconds() xmltocursor( "x1.xml", "x2", 512 ) ?? seconds() - i i = seconds() oRecordset.Open("tmp.xml") oOleDb.RsToCursor(oRecordSet, "x3") oRecordset.Close() ?? seconds() - iMy results (on P3-600):
n CursorToXml XmlToCursor VFP ADO VFP ADO 1000 0.040 0.130 0.491 0.160 2000 0.070 0.270 1.572 0.281 4000 0.150 0.521 5.808 0.581 10000 0.371 1.412 92.513 1.472Not very bad, isn't it?