Solved

XslCompiledTransform performance very slow on first load.

Posted on 2007-04-10
3
929 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

691 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