473,322 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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 3206

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.microsoft.com (""Jeffrey Tan[MSFT]"") wrote in message news:<WI**************@cpmsftngxa06.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 interoperability 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.microsoft.com (""Jeffrey Tan[MSFT]"") wrote in message news:<WI**************@cpmsftngxa06.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****@microsoft.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
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...
2
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="..."...
7
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...
4
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 =...
3
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...
1
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...
1
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...
5
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...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.