Re: XML document in a treevie needs 57secodns

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



Hi
Yes please let me know about...

Thanks and regards remo

"Lloyd Dupont" <net.galador@ld> wrote in message
news:%23mtb0o1IHHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
I don't have this article....
Anyway IF you purpose is to improve the speed of this operation
I could suggest a couple of things.

"remo" <brigger@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23ZY9Hg0IHHA.1816@xxxxxxxxxxxxxxxxxxxxxxx
Hello
The code is copied from MSDN here is the link:

Knowledge Base:
How to populate a treeview control with XML data in Visual C# 2005
or in visual C# .NET


ms-help://MS.VSCC.v80/MS.MSDN.vAug06.en/enu_kbnetframeworkkb/netframeworkkb/317597.htm

Running on a Dell Inspiron 9400 dualcore, with 2GB Ram
Intel CPU T2400 @1.83GHz

Using VisualStudio 2005 and C#
The XML File is 158kb and has the folowing structure:
<Root>
<sz> x="1.1" y=1.1</sz>
<mx> x="1" y=1</mx>
<dm>
<dc x="1" y="1"/>
<op x="1.1" y="1.1"/>
<fp x="1.1" y="1.1"/>
<fs x="1.1" y="1.1"/>
<fr x="1.1"/>
<dv>
<bpc x="1"/>
<op x="1.1" y="1.1"/>
<fp x="1.1" y="1.1"/>
<fs x="1.1" y="1.1"/>
<fr x="1.1"/>
<bp>
<op x="1.1" y="1.1"/>
<fp x="1.1" y="1.1"/>
<fs x="1.1" y="1.1"/>
<fr x="1.1"/>
<Req x="1">
<st>1</st>
</bp>
</dv>
</dm>
</Root>
This is only the structure, the names are 10..15char's long
The attributes "1.0" are floats
The "1" are integer values

Each dm contains 64 dv's
Each dv contains one bp
There are 4 dm's and 64 dv's in one dm: 256 dv's and 256 bp's

Loading the XML DOM using about 40ms ... 500ms
Loading the tree using about 55..58s

regards remo





"Yves. L." <YvesL@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u4%23DDIrIHHA.536@xxxxxxxxxxxxxxxxxxxxxxx
Send some sample code and somebody might find an answer.


remo wrote:
Not my code is slow!
MS code is slow!
...



"Lloyd Dupont" <net.galador@ld> wrote in message
news:OlHHDolIHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
Mhh... interesting.
Out of curiosity, why do you write slow code?

"remo" <brigger@xxxxxxxxxxxxxxxxxx> wrote in message
news:OnlnS7UIHHA.4216@xxxxxxxxxxxxxxxxxxxxxxx
Cant believe it:
Loading an XML document (150kb) in a treeview using .net 2.0 using
2.0 seconds!!!
That is unusable!!!
Loading the same document in Iexplore, it needs 1/100 of a second
That could not be .net
That is incredible, and non usable.
What in the hell do ms wasting the time...

regards remo









.



Relevant Pages

  • Re: XML document in a treevie needs 57secodns
    ... Using VisualStudio 2005 and C# ... The XML File is 158kb and has the folowing structure: ... Loading the XML DOM using about 40ms ... ... why do you write slow code? ...
    (microsoft.public.dotnet.framework)
  • Re: XML document in a treevie needs 57secodns
    ... Using VisualStudio 2005 and C# ... The XML File is 158kb and has the folowing structure: ... Loading the XML DOM using about 40ms ... ... why do you write slow code? ...
    (microsoft.public.dotnet.framework)
  • RE: Data Insertion
    ... You _have_ to use schema to accomplish that, ... Inference is OK for prototyping and, may be, loading 1-2K XML files; ... Change your XML file to contain embedded schema. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: ajax, xml and applying xslt
    ... The iframe one would work because it is loading ... transform xml. ... I don't know what made me think a .net web form could ... transform xml on it's own. ...
    (comp.lang.javascript)
  • Re: Aborting the LoadXML method of XmlDocument
    ... >> stoneyowl wrote: ... >>> Is there any way to abort the loading and parsing of a large Xml ... If you need to interrupt I/O operations, ... Use asynchronous I/O to load the XML ...
    (microsoft.public.dotnet.framework)