Solved

XslCompiledTransform performance very slow on first load.

Posted on 2007-04-10
3
900 Views
Last Modified: 2013-11-18
Hi There,

I'm having some issues with peformance of my application when it first loads. It seems to be taking at least 4 second to load the first time. Could someone help me with some code snippets to make it perform a little better please?

Thanks in advance

Sean
 

XPathDocument xDoc = new XPathDocument(xmlreader);
            string xslPath = Server.MapPath("test.xslt");
            XslCompiledTransform transform = new XslCompiledTransform();
            transform.Load(xslPath);
            transform.Transform(xDoc, null, Response.Output);
0
Comment
Question by:bullrout
3 Comments
 
LVL 12

Expert Comment

by:jkmyoung
ID: 18883096
When you say first time, do you mean if you reload the xslt and transform again then the  time suddenly decreases? Then your load time may have more to do with included libraries; you could try reducing those.
0
 
LVL 5

Author Comment

by:bullrout
ID: 18885414
yes that's correct. But I have read that the XslCompiledTransform class is a compiler and that on first load it compiles the stylesheet where as the XslTransform class is an interpreter but that class is deprecated in .net 2.0. So you think that limiting the namespaces I have in the page will have an effect?

I will give it a try, is there anyother ideas? I'm looking for the fastest way.
0
 
LVL 11

Accepted Solution

by:
Vivek Thangaswamy earned 500 total points
ID: 18953569
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need to pass a connection through class/Method 1 39
xpath sql query 2008 8 43
Help with Syntax 9 28
Grunt Copy file to another destination. 1 14
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now