Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7410573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:15:16+00:00 2026-05-29T06:15:16+00:00

My project has a reporting module that gathers data from the database in the

  • 0

My project has a reporting module that gathers data from the database in the form of XML and runs an XSLT on it to generate the user’s desired format of report. Options at this point are HTML and CSV.

We use Java and Xalan to do all interaction with the data.

The bad part is that one of these reports that the user can request is 143MB (about 430,000 records) for just the XML portion. When this is transformed into HTML, I run out of heap space with a maximum of 4096G reserved for heap. This is unacceptable.

It seems that the problem is simply too much data, but I can’t help but think there is a better way to deal with this than limiting the customer and not being able to meet functional requirements.

I am glad to give more information as needed, but I cannot disclose too much about the project as I’m sure most of you understand. Also, the answer is yes; I need all of the data at the same time: I cannot paginate it.

Thanks

EDIT

All the transformation classes I am using are in the javax.xml.transform package. The implementation looks like this:

final Transformer transformer = 
  TransformerFactory.newInstance().newTransformer(
    new StreamSource(new StringReader(xsl)));
final StringWriter outWriter = new StringWriter();
transformer.transform(
  new StreamSource(new StringReader(xml)), new StreamResult(outWriter));
return outWriter.toString();

If possible, I would like to leave the XSLT the way it is. The StreamSource method of doing things should allow me to GC some of the data as it is processed, but I’m not sure what limitations on XSLT (functions, etc) this might require for it to do proper cleanup. If someone could point me at a resource detailing those limitations, it would be very helpful.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:15:17+00:00Added an answer on May 29, 2026 at 6:15 am

    We are able to improve this by doing two things.

    1. We take the XML source and destination format and make them files in temp. This keeps the initial creation and storage out of RAM, since the data is coming from a database and being written back to the DB as well. A handle to the data is all that’s necessary.

    2. Use the Saxonica transformer. This allows for a couple things including SAX-style transformations and the use of XSLT 2.0, which the Xalan parser does not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Reporting Database in Project Server 2007 has about 7 User Views based on
I have a Reporting services project that has a number of reports in the
Our project has one folder that is not part of the solution. How can
So right now my project has a few custom dialogs that do things like
The project I work on has recently been switched from a horribly antiquated revision
Every project invariably needs some type of reporting functionality. From a foreach loop in
I currently have a reporting services project that is displayed as part of an
I am doing a small reporting project that needs to read a lot of
My project has both client and server components in the same solution file. I
My project has collected CSS entropy (unused classes) during its course of development. Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.