Re: XmlTextReader or XmlDocument or SQLCE
- From: "Simon Hart" <srhartone@[no spam]yahoo.com>
- Date: Thu, 5 Jan 2006 20:11:17 -0000
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
>>
>
>
.
- Follow-Ups:
- Re: XmlTextReader or XmlDocument or SQLCE
- From: Safae
- Re: XmlTextReader or XmlDocument or SQLCE
- From: Ilya Tumanov [MS]
- Re: XmlTextReader or XmlDocument or SQLCE
- References:
- XmlTextReader or XmlDocument or SQLCE
- From: Safae
- Re: XmlTextReader or XmlDocument or SQLCE
- From: Simon Hart
- Re: XmlTextReader or XmlDocument or SQLCE
- From: Safae
- Re: XmlTextReader or XmlDocument or SQLCE
- From: Ilya Tumanov [MS]
- XmlTextReader or XmlDocument or SQLCE
- Prev by Date: Re: Setting Owner Information Through The Registry
- Next by Date: Re: PNG with alpha blending support
- Previous by thread: Re: XmlTextReader or XmlDocument or SQLCE
- Next by thread: Re: XmlTextReader or XmlDocument or SQLCE
- Index(es):
Relevant Pages
|