Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Xml deserialization speed (Read 2195 times)
mtan9
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Nov 19th, 2007
Xml deserialization speed
Nov 20th, 2007 at 2:04am
Print Post  
Hi,

We're currently using version 4.2.1.26908 and the XmlReader deserialization of large flow charts (> 400 items) takes quite a while (~45 sec). I had a few questions regarding this:

1. Has the XML deserialization speed been improved in the FlowChart.LoadFromXml in v5?

2. Can the FlowChart.LoadFromXml read previous version's XML strings?

3. In v5, is there a performance difference between the LoadFromXml overload which takes a document vs. the one which takes a string?

Thanks in advance.

Micah Tan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Xml deserialization speed
Reply #1 - Nov 20th, 2007 at 8:26am
Print Post  
Hi,

Quote:
1.  Has the XML deserialization speed been improved in the FlowChart.LoadFromXml in v5?


Do you display some large images in the nodes?
We've done some tests with 400 nodes and 400 links:

V4.2, without images: the file loads for a second
V5.0, without images: the file loads for a second
V4.2, with 10 images: the file loads for 12 seconds
V5.0, with 10 images: the file loads for 2 seconds

Each image from the last tests is assigned to 40 nodes. In this case the speed in version 5 is better because the bytes of shared images are encoded and saved just once; whereas version 4 saves a separate copy for each node, and subsequently decodes 400 image copies when loading.

Because version 5 uses the DOM API and version 4 uses linear serialization, the XML serialization is a bit slower in V5 when not using images, or when they are not shared between nodes.

Quote:
2.  Can the FlowChart.LoadFromXml read previous version's XML strings? 


Yes; actually you must use the LoadFromString method to load an XML string.

Quote:
3.  In v5, is there a performance difference between the LoadFromXml overload which takes a document vs. the one which takes a string?   


The latter calls the former after creating an XmlDocument object from the string content.

Stoyan
  
Back to top
 
IP Logged
 
mtan9
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Nov 19th, 2007
Re: Xml deserialization speed
Reply #2 - Nov 21st, 2007 at 5:42pm
Print Post  
Thanks for the quick reply. I checked the performance of the Release/Debug builds outside of the debugger and I was able to get close to the same number that you listed.

Is there a reason why the performance is so different between running in the debugger and running the debug build outside of the debugger?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Xml deserialization speed
Reply #3 - Nov 21st, 2007 at 6:07pm
Print Post  
Hi,

It seems there's lots of stuff going on while the debugger is running, so it might slow down the code execution considerably:
http://www.developerfusion.co.uk/show/4692/

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint