You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Judi Thomson <gr...@yahoo.com> on 2002/06/13 18:50:20 UTC

performance with large files

I'm having a performance problem using Xalan to apply
an xslt sheet to a large XML file (about 2 mg).
Its strange because I get different performance when I
use the command-line application and when I use the
api.

If I open my XML document and xslt sheet in XML spy,
set XMLSpy to use the XalanTransform as its XSLT
processor and apply the sheet to the XML, I get the
correct result in about 15 seconds.  This is
acceptable performance for me given that I'm working
with 2mgs of XML file.  (I would imagine that I'd get
the same performance from the command line- just
haven't tried it)

However, when, from my application, I instantiate a
XalanTransformer object and send it my XML data and
XSLT data as streams to the transformer (using the
method below) it can take as long as a couple hours to
come back with results!  2 hours is just unacceptable
performance. This is using exactly the same XML data
and style sheet.

Does anyone have any suggestions about what might be
causing this difference or what I could do about it?
All the code is written in Visual C++ with the
dinkumware patches applied to the appropriate
headerfiles.

Thanks!
Judi Thomson

*******
code below
************

XSLTInputSource inDocSrc( inDocStr); 
XSLTInputSource inStyleSrc( inStyleStr);
XSLTResultTarget outTarget(outputStr);

XalanTransformer theXalanTransformer;
int results=0;
results=
theXalanTransformer.transform(
  (XSLTInputSource&) inDocSrc,                 
(XSLTInputSource &) inStyleSrc, 
outTarget);

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com