Re: XmlTextReader or XmlDocument or SQLCE

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I wouldn't really call it "unrealistic expectations", I would call it
experience, and testing. I would love to see a 1 second response time
reading a single node from a 200k XML file on any version of CF running on
any processor.

It's really a no brainer, why give yourself so much work when a tool such as
SQL CE does it (and does it a lot better - with more options) without having
to do hardly any work.

"Ilya Tumanov [MS]" <ilyatum@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:43bd75f8$1@xxxxxxxxxxxxxxxxxxxxx
> Actually, this "dog slow" idea is mostly from combination of unrealistic
> expectations (e.g. my desktop with 3+GHz superscalar fully featured CPU
> with 2GB or extremely fast RAM does that in 1 seconds, why it takes 2
> minutes on puny 200 MHz RISC processor with slow 16 bit 32 MB RAM?), older
> hardware (e.g. 100MHz PPC 2000), older versions of NETCF (V1 RTM instead
> of SP2+ or V2) and improper ways of working with XML (e.g. using inference
> to load XML into DataSet or using DOM to get a single value from a big
> file).
>
>
> It is very possible to achieve adequate performance on relatively modern
> hardware running NETCF V1 SP3 or V2.
>
>
>
> With XmlTextReader it should take about a second to read 200K document
> node by node.
>
> DataSet.ReadXml() would load it in about 2-3 seconds assuming schema is
> used.
>
>
>
> This data is for NETCF V2 running in PXA 255@400 MHz on PPC 2003. It's
> about twice as long for NETCF V1 SP3.
>
>
>
> So, it should be OK to use DataSet.ReadXml() with 200-500K XML.
>
>
>
> Just make sure:
>
> - You're using schema (typed DataSet, created programmatically, loaded
> from separate file or embedded into the XML).
>
> - Avoid using DateTime fields as they are very slow to parse.
>
> - Use related tables instead of nested tables.
>
>
> As to saving XML file after each change, simply don't do that. Imagine
> Word would save each time you type one character, now that would be
> terrible.
>
> DataSet is especially designed so you don't have to do that. It cashes
> data in memory so you can access and change it as needed and persist it
> from time to time.
>
> Save it only on user request, on timer or if your application closes.
>
>
>
> And no, there's no way to update part of XML with any class, it can only
> be rewritten as a whole.
>
> This is indeed a big disadvantage of XML compared to even comma separated
> file; you can at least add records to it which is not possible with XML.
>
>
> Best regards,
>
>
> Ilya
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> *** Want to find answers instantly? Here's how... ***
>
> 1. Go to
> http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
> 2. Type your question in the text box near "Search this group" button.
> 3. Hit "Search this group" button.
> 4. Read answer(s).
>
> "Safae" <safaezoul@xxxxxxxx> wrote in message
> news:1136487624.164761.92030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Thanks for your help,
>>
>> but if I reduce the size of my XML file to 150 ko,200ko, I will have
>> the same Problem? can I still work with XML file because SQl CE is not
>> appropriate to me ?
>>
>> by using dataset functions the real problem is not in readxml function
>> but in WriteXML because I must after each change of data call this
>> function. that's mean if I update one record of dataset the function
>> WriteXMl rewrite all the file. there is no possibility to save changes
>> in XML file by another way for example by XMLTextWriter?instead of
>> Dataset.writeXml?
>>
>> Regards
>>
>
>


.



Relevant Pages

  • Re: xml in plain text file on heavy load.
    ... even if the XML file is magically and perfectly ... I want to emphasize that IIS would never be caching that XML file on its own ... Application is NOT synchronizing access to your ASP pages. ...
    (microsoft.public.inetserver.iis)
  • Re: TAPI 3.0 call attached data
    ... The format of the Call Attached Data is XML. ... XML file with CallAttchedData represents one or multiple data lists ... Root element is CallAttachedData. ... version CDATA #FIXED "1.0" ...
    (microsoft.public.win32.programmer.tapi)
  • Re: XML parser and writer
    ... them on a calendar. ... Therefore I will need to both easily parse and write new XML files. ... why not some database technology? ... an advanced user can edit the XML file directly at ...
    (comp.lang.java.programmer)
  • Re: Zooming Out: The Larger Issue
    ... XML file or a binary file (smaller and faster to serialize deserialize, ... On startup of your app you could just check if the xml / binary file exists ... datarow = the container of one or more datacolumns wich in there turn hold ...
    (microsoft.public.dotnet.languages.vb)