Solved

XslCompiledTransform performance very slow on first load.

Posted on 2007-04-10
3
912 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to count occurrences of each item in an array.

856 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