473,786 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML/XSLT Transformations

I am currently in the process of evaluating the performance hits of moving
to the .NET platform for our application. I created a sample project that
loads the transforms the same XML and XSLT in COM, COM using interop and in
C# and then transforms it to HTML. I also tried concatenating the XML and
XSL as a string and then loading it to the DOM once as opposed to loading
the DOM with the appendChild() method. I see that the C# version is
magnitudes slower in both cases and this scares me. We are headed to .NET so
I have to find out if anyone has figured out how to speed up the
transformation or the DOM load using C#. ANY help would be greatly
appreciated.

Thanks in advance,

Chris


Nov 15 '05 #1
6 3237

Hi Christopher,

Thank you for posting in the community!

Based on my understanding, your team will head to use .Net, so you want to
do some performance comparison between the MSXML and .Net XML class library.

=============== =============== =============== ====
Actually, your test is the performance comparison between MSXML and .Net
XML, not the performance of C# code. In your test, the C# is just a test
language for .Net XML class library, it does not affect the performance.

For the comparison, there are some good articles talks about it, please
refer to the 2 articles below for useful information:
"XSLT Performance in .NET"
http://www.ondotnet.com/pub/a/dotnet.../xsltperf.html

"A Practical Comparison of XSLT and ASP.NET"
http://msdn.microsoft.com/library/de...us/dnexxml/htm
l/xml02192001.asp

=============== =============== =============== ====
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Have a nice weekend!!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2
Hey Jeff,

Thanks for the response. I wanted to be clear that I was using the
..NET XML with C#, sorry for the confusion. Is there any large known
bottlenecks with using the .NET XML? Things to stay away from? In my
tests, I have a fairly large XML document with extremely simple XSL
and it doesn't even begin to compare to the performance of the VB or
Interop. I figured there might be some people that would know how to
speed it up. I found that loading the XmlDocument is not the problem,
the .Transform is. Any experience in speeding this up? I would gladly
post code samples if you need them. Thanks again.

Chris

v-*****@online.mi crosoft.com (""Jeffrey Tan[MSFT]"") wrote in message news:<WI******* *******@cpmsftn gxa06.phx.gbl>. ..
Hi Christopher,

Thank you for posting in the community!

Based on my understanding, your team will head to use .Net, so you want to
do some performance comparison between the MSXML and .Net XML class library.

=============== =============== =============== ====
Actually, your test is the performance comparison between MSXML and .Net
XML, not the performance of C# code. In your test, the C# is just a test
language for .Net XML class library, it does not affect the performance.

For the comparison, there are some good articles talks about it, please
refer to the 2 articles below for useful information:
"XSLT Performance in .NET"
http://www.ondotnet.com/pub/a/dotnet.../xsltperf.html

"A Practical Comparison of XSLT and ASP.NET"
http://msdn.microsoft.com/library/de...us/dnexxml/htm
l/xml02192001.asp

=============== =============== =============== ====
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Have a nice weekend!!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

Hi Chris,

Thanks for your feedback.

I will spend some time on this issue, I will reply to you ASAP.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4
Hi Chris,

Sorry for letting you wait for so long time.

After consulting and researching, I will provide some information for you:

For some known issue about XSL Transformation, please refer to:
"PRB: XSL Transformations May Perform Slower with System.Xml Than MSXML"

SYMPTOMS
========
XSL Transformations (XSLT) may perform slower with System.Xml classes in
comparison with transformations that are performed with Microsoft XML
(MSXML) 4.0.

CAUSE
=====
The System.Xml.Xslt namespace in the Microsoft .NET Framework Class
Libraries provides a set of classes for XSL Transformations for XML data in
..NET-based applications, whereas MSXML is a COM-based technology that
provides full XML services to COM-based applications.

The latest release of MSXML (Microsoft XML Core Services 4.0) compiles and
executes XSLT faster and provides one of the fastest XSLT engines that is
currently available.

RESOLUTION
==========
If XSLT is only a small part of your application, performance loss (when
you compare it to MSXML 4.0) may be negligible. Applications that you
develop solely with System.Xml have numerous benefits that System.Xml and
the .NET Framework provide, such as interoperabilit y with Microsoft ADO.NET
components, scalability, and other enhancements.

If you develop the application solely for XSLT, and if performance is a
concern, you can use an MSXML 4.0 parser for XSLT operations with your
..NET-based application by using the COM Interop technology. For more
information about how to use MSXML 4.0 with the Interop technology, see the
"References " section of this article.

STATUS
======
This behavior is by design. Microsoft is currently developing the next
major version release of Microsoft Visual Studio .NET with an improved and
faster XSLT parser and engine.

Also, I want to inform you that: Use of MSXML is Not Supported in .NET
Applications, so you are not recommanded to interop with MSXML in .Net, for
more information, please refer to:
http://support.microsoft.com/default...b;en-us;815112

For suggestion about how to improve performance of XSLT Transformations in
the .NET Framework, please refer to:
http://support.microsoft.com/default...b;en-us;325689

Hope all these information can help you!

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #5
Jeff,

Thanks so much. I extremely appreciate your time and efforts. This was
a great answer. One last question: When is MS planning on addressing
some of these performance issues? I assume that a lot of people
porting to .NET and using the XML libraries are also affected by the
poor transformation speeds. Any help would be appreciated.

Chris

v-*****@online.mi crosoft.com (""Jeffrey Tan[MSFT]"") wrote in message news:<WI******* *******@cpmsftn gxa06.phx.gbl>. ..
Hi Christopher,

Thank you for posting in the community!

Based on my understanding, your team will head to use .Net, so you want to
do some performance comparison between the MSXML and .Net XML class library.

=============== =============== =============== ====
Actually, your test is the performance comparison between MSXML and .Net
XML, not the performance of C# code. In your test, the C# is just a test
language for .Net XML class library, it does not affect the performance.

For the comparison, there are some good articles talks about it, please
refer to the 2 articles below for useful information:
"XSLT Performance in .NET"
http://www.ondotnet.com/pub/a/dotnet.../xsltperf.html

"A Practical Comparison of XSLT and ASP.NET"
http://msdn.microsoft.com/library/de...us/dnexxml/htm
l/xml02192001.asp

=============== =============== =============== ====
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Have a nice weekend!!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #6
Hi Chris,

Thanks very much for your feedback.

I am very glad my reply makes sense to you.

For your furture xml performance planning, I can not give you a determine
answer. I think you may regard the msdn.microsoft. com for the more recently
planning and changes for .Net.

Also, I think you may provide your suggestion to
http://register.microsoft.com/mswish/suggestion.asp
or email to: ms****@microsof t.com

Hope this help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2748
by: Pete | last post by:
I am just getting to grips with XML and I was wondering if you could help me with something that no-one seems able or willing to help with.. I have an XSLT file which should be transforming a straight XML file http://www.discovertravelandtours.com/test/templates/test.xml?Location=Germany To another XML file http://www.discovertravelandtours.com/test/templates/test2.xml?Location=Germany
2
6090
by: full_philNO | last post by:
Hi all, I have a problem with the img tag. It simply doesn't want to translate into a img XHTML tag. When I write in XSLT : <img src="..." alt="..." ..../> or <img src=".." alt="..." .....></img> The output is always :
7
4126
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:my-javascript-ext="my-ext1" extension-element-prefixes="my-javascript-ext"
4
5251
by: Stephen | last post by:
I have the following that outputs an xml file to a div using ajax: <script type="text/javascript"> function ajaxXML(url,control_id){ if (document.getElementById) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } if (x) {
3
2197
by: Teksure | last post by:
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about the development environment or recommend me some other that you know. XML IDE's - http://xslt-process.sourceforge.net - http://www.mentattech.com/themes/mentat/alchemist/index.html Regards,
1
1624
by: Dan | last post by:
I have a C# program which executes some XSLT transformations. The XSLT code requires an input intermediate file, generated by other transformations, as its duty is copying some data from an input XML while inserting into it another XML fragment. E.g. let's say this is the original XML: <Dummy> <contacts> ... contacts go here ... </contacts> </Dummy>
1
2068
by: daniele74 | last post by:
Hy, I want ask you this question. I have two schema file schema1.xsd and schema2.xsd. then I have a stylesheet transformation style2.xsl that show in a browser an xml file that has schema2.xml as schema. moreover I have an xslt tranformation that map schema1.xsd in schema2.xsd (schema1TOschema2.xslt). so the question is: it is possible to use style2.xsl to view xml file that has schema1 as schema?? with instractions similar to this...
5
1469
by: Seesharp2008 | last post by:
Hi guys! I want to do a sequence of transformations on an xml file. here is the scenario: Input.xml-------XSLT------>output.xml------XSLT------->output.xml....... for fulfiling this i have to save the first output on my hard disk and then use it again. What I have done is to copy the out put in to a temp.xml file , delete the out put file and use the temp.xml file as the input for the second transformation. But it fails and the...
2
3225
by: killy971 | last post by:
I have been testing different libraries to process XSL transformations on large XML files. The fact is that I read a document from Intel, stating their library (XSLT accelerator) was more twice faster than Apache Xalan, and was designed to perform well on large XML files. - http://isdlibrary.intel-dispatch.com/isd/10/wp_XSLT.PDF - http://www.intel.com/cd/software/products/asmo-na/eng/366637.htm Please note that their benchmark was only...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4064
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.