Java heap space problem in xalan

Discussion in 'XML' started by Sandy, Dec 30, 2005.

  1. Sandy

    Sandy Guest

    I am doing XSL transformation using xalan, but sometimes the input XML files
    are too large and that cause
    "java.lang.OutOfMemoryError: Java heap space" exception in xalan.

    Is there any way to split the xml file and do processing.

    I tried to use the -FLAVOR s2s assuming that it will help as xalan won't
    keep the xml tree in memory, but that also didn't help.
     
    Sandy, Dec 30, 2005
    #1
    1. Advertising

  2. Sandy

    Soren Kuula Guest

    Sandy wrote:
    > I am doing XSL transformation using xalan, but sometimes the input XML files
    > are too large and that cause
    > "java.lang.OutOfMemoryError: Java heap space" exception in xalan.
    >
    > Is there any way to split the xml file and do processing.
    >
    > I tried to use the -FLAVOR s2s assuming that it will help as xalan won't
    > keep the xml tree in memory, but that also didn't help.


    There's a different transformation language called STX, which can
    transform in a streaming fashion (as opposed to XSL, which generally
    requires the whole input document to be loaded before all expressions
    can be evaluated). It's much faster, too.
    You might want to google for it, and see if your transform can be
    translated into that. If you don't use upward axes, it probably can.

    Otherwise, you have to look through your transform manually and see if
    there is anything preventing you from doing a split, such as sibling
    axis steps on the nodes that you want in separate documents, or
    predicates that examine something about nodes that have been flung into
    a different document.

    Soren
     
    Soren Kuula, Dec 31, 2005
    #2
    1. Advertising

  3. Sandy

    Guest

    We are working on the XSLT for a new XML processing model called
    VTD-XML
    http://vtd-xml.sf.net, it consumes 5x less memory than Xerces DOM,and
    also
    10x faster while retaining random access..
    a demo is at http://vtd-xml.sf.net
     
    , Jan 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cvissy
    Replies:
    0
    Views:
    628
    cvissy
    Nov 16, 2004
  2. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,955
    Bryan Bullard
    Jul 11, 2003
  3. Christian Seberino
    Replies:
    21
    Views:
    1,766
    Stephen Horne
    Oct 27, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    1,079
    Steve Lamb
    Oct 23, 2003
  5. Ajay

    How to increase stack space/heap space

    Ajay, May 11, 2006, in forum: C Programming
    Replies:
    9
    Views:
    577
Loading...

Share This Page