Solved

XslCompiledTransform performance very slow on first load.

Posted on 2007-04-10
3
887 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
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
send mail from app.net 8 27
Grunt No Clean Targets 6 53
Default parameter problem in C# 3 25
XML & .net 5 16
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

771 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

11 Experts available now in Live!

Get 1:1 Help Now