469,571 Members | 1,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,571 developers. It's quick & easy.

Perfomance issues while XML Transformation to an Excel using xslt

Hi All,
We have created a simple application that takes a dataset and
generates the data in Excel schema format. It uses an xslt file to do
the transformation for excel 2002 and so on. We are using the
dotnet.xml resource and not the MSXML 4.
The application is golden and works fine with realtively Medium size
of data(around 25MB). We started to see issues if the data is greater
then 25 MB where the transformation takes tooo long and sometimes it
just time out.

Any body having similar experience and their resolution are greatly
appriciated.
I also wanna know that if we switch to the syncronous MSXML 4
technology for large data will it resolve the issue. I have not yet
done any testing no not very sure so if some one has any experience in
this area please let me know.

Thanks
Pranay Jain
Nov 11 '05 #1
6 4250
Are you perhaps using <xsl:key> or something else described in these KB
articles in your XSLT stylesheet?

See:
http://support.microsoft.com/default...;EN-US;Q324478
http://support.microsoft.com/default...;EN-US;Q325689

--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com

"Jain, Pranay Kumar" <pr*************@hotmail.com> kirjoitti viestissä
news:26**************************@posting.google.c om...
Hi All,
We have created a simple application that takes a dataset and
generates the data in Excel schema format. It uses an xslt file to do
the transformation for excel 2002 and so on. We are using the
dotnet.xml resource and not the MSXML 4.
The application is golden and works fine with realtively Medium size
of data(around 25MB). We started to see issues if the data is greater
then 25 MB where the transformation takes tooo long and sometimes it
just time out.

Any body having similar experience and their resolution are greatly
appriciated.
I also wanna know that if we switch to the syncronous MSXML 4
technology for large data will it resolve the issue. I have not yet
done any testing no not very sure so if some one has any experience in
this area please let me know.

Thanks
Pranay Jain

Nov 11 '05 #2
DEV
Hello Teemu ,
No i am not using any of the options mentioned in thosed articles. This
looks to be a issue with dotnet xml resource that i am using and thereby
was interested to know if someone had similar experience in the past.

thanks
Pranay Jain

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 11 '05 #3
Jain, Pranay Kumar wrote:
We have created a simple application that takes a dataset and
generates the data in Excel schema format. It uses an xslt file to do
the transformation for excel 2002 and so on. We are using the
dotnet.xml resource and not the MSXML 4.
The application is golden and works fine with realtively Medium size
of data(around 25MB). We started to see issues if the data is greater
then 25 MB where the transformation takes tooo long and sometimes it
just time out.

Well, first make sure your stylesheet is optimized for speed, then consider
switching to using MSXML.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #4
DEV wrote:
No i am not using any of the options mentioned in thosed articles. This
looks to be a issue with dotnet xml resource that i am using and thereby
was interested to know if someone had similar experience in the past.

May be that's the problem is - you are not using keys? Usually keys can
greatly improve performance on big documents by allowing direct access to
nodes. What is your stylesheet doing and how?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #5
Hello Oleg,
Thanks for your suggestions. Well we dont use <xsl:key> as we did had
the necessity to implement while we were developing the application.
Also since the application works with relatively large amount of data
the application is serving the purpose but not completely. One more
reason was we tried to keep the stylesheet as simple as possible so that
it can be easily maintainable as things gets complex very soon with this
kind of architecture.
To more eloborate the issue , first we generate our custom xml and then
apply the stylesheet to do the transformation to an xml stream object
which is then send to the browser using the response object of an .aspx
page.
Since the transformation time is longer with huge xml(>5MB) it starts
recycling the aspnet_wp.exe.

It works fine with any xml less than 5MB.

Thereafter, during our further testing with profilers we found that we
are using the XSLT substring funciton and that is consuming more memory
and thereby causing the aspnet_wp.exe to recycle by itself.

I dont have a solution as of now. But the areas that i will be looking
further are
1)getting rid of the XSLT substring function and rather calling a
JavaScript Substring function or some other inbuilt function or will
write one custom function.
2)As suggested will look further to investigate the use of <xsl:key> and
how it can help us out in our scenario.

I am able to generate Data worth more than 10,000 rows in excel with 10
columns with each column containing more than 100 characters. So this is
certainly not working with Huge amount of data. Our business requirement
is to handle much more data than what i have mentioned so we are trying
to investigate the issue.

Any suggestion from here onwards will be of great help.
Thanks
Pranay Jain.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 11 '05 #6
XML Problem wrote:
Thanks for your suggestions. Well we dont use <xsl:key> as we did had
the necessity to implement while we were developing the application.
Also since the application works with relatively large amount of data
the application is serving the purpose but not completely. One more
reason was we tried to keep the stylesheet as simple as possible so that
it can be easily maintainable as things gets complex very soon with this
kind of architecture. Well, that sounds reasonable in general, but using keys actually doesn't
necessarily increases stylesheet's complexity, moreover, alowing direct access
to nodes by key long-winded tree-navigational XPath expressions can be eliminated.
To more eloborate the issue , first we generate our custom xml and then
apply the stylesheet to do the transformation to an xml stream object
which is then send to the browser using the response object of an .aspx
page. How do you generate it and why don't you transform directly to the response?
Since the transformation time is longer with huge xml(>5MB) it starts
recycling the aspnet_wp.exe.

Well, actually 5Mb is not a huge size for XSLT, it's quite big, but definitely
not huge one. I suggest you first try to optimize the whole workflow -
eliminate any superfluous interim objects like XmlDocuments, keep processing
streaming. Then optimize your stylesheet - optimize transformation algorithm
(chances are this one is the bottleneck), get rid of any //, avoid temporary
trees and extension scripts. Well, if that's not enough then - are you sure
you can't get the job done without XSLT, e.g. using XmlReader/XmlWriter?
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Nov 11 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Sergio del Amo | last post: by
4 posts views Thread by =?Utf-8?B?REZC?= | last post: by
1 post views Thread by =?Utf-8?B?R2xlbm4gR29tZXo=?= | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.