R
Richard Kucia
My app's startup time has always been horrible, so I was looking forward
with great anticipation to CF SP2.
The app reads a single XML file once during its startup, and it stores the
contents in various objects.
I installed CF SP2 (non-developer) on my Dell Axim X5 and timed ReadXML in a
variety of ways. I created a two files, one with and one without an embedded
schema. Then I tried various combinations of ReadXML and XMLReadMode. Here
are the results, in milliseconds:
File and XMLReadMode Elapsed Time in ms
-------------------------- -------------------
NoSchema + Auto 14.129
Schema + Auto 6.782
Schema + Ignore .358
Schema + ReadSchema 5.630
NoSchema + Auto 12.711
NoSchema + Infer 12.146
Typical code for any one of these cases is:
RaiseEvent InitializationStepEvent("User: Reference file: No Schema + Auto")
ReferenceDataSet = New System.Data.DataSet("reference")
fsXML = New System.IO.FileStream(clsCommon.AppPath & "Reference With No
Schema.xml", System.IO.FileMode.Open, IO.FileAccess.Read)
myXmlReader = New System.Xml.XmlTextReader(fsXML) ' Create an XmlTextReader
to read the file
ReferenceDataSet.ReadXml(myXmlReader, System.Data.XmlReadMode.InferSchema)
I believe the Axim is running CF CLR 1.0.3316.0
Can anyone offer an explanation for the truly wide disparity among these
results? I'd be happy to send the files to anyone wishing to reproduce these
test results.
Richard Kucia
with great anticipation to CF SP2.
The app reads a single XML file once during its startup, and it stores the
contents in various objects.
I installed CF SP2 (non-developer) on my Dell Axim X5 and timed ReadXML in a
variety of ways. I created a two files, one with and one without an embedded
schema. Then I tried various combinations of ReadXML and XMLReadMode. Here
are the results, in milliseconds:
File and XMLReadMode Elapsed Time in ms
-------------------------- -------------------
NoSchema + Auto 14.129
Schema + Auto 6.782
Schema + Ignore .358
Schema + ReadSchema 5.630
NoSchema + Auto 12.711
NoSchema + Infer 12.146
Typical code for any one of these cases is:
RaiseEvent InitializationStepEvent("User: Reference file: No Schema + Auto")
ReferenceDataSet = New System.Data.DataSet("reference")
fsXML = New System.IO.FileStream(clsCommon.AppPath & "Reference With No
Schema.xml", System.IO.FileMode.Open, IO.FileAccess.Read)
myXmlReader = New System.Xml.XmlTextReader(fsXML) ' Create an XmlTextReader
to read the file
ReferenceDataSet.ReadXml(myXmlReader, System.Data.XmlReadMode.InferSchema)
I believe the Axim is running CF CLR 1.0.3316.0
Can anyone offer an explanation for the truly wide disparity among these
results? I'd be happy to send the files to anyone wishing to reproduce these
test results.
Richard Kucia