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

  • Home
  • SEARCH
  • 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 766963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:08:00+00:00 2026-05-14T17:08:00+00:00

I have a system that is performing many XSL transformations on XMLType objects. The

  • 0

I have a system that is performing many XSL transformations on XMLType objects. The problem is that the system gradually slows down over time, and sometimes crashes when it runs out of memory. It seems that the slow down (and possibly memory crash) is around the dbms_xslprocessor.processXSL function call, which gradually takes longer and longer to complete.

The code looks like this:

v_doc dbms_xmldom.DOMDocument;
v_transformer dbms_xmldom.DOMDocument;
v_XSLprocessor dbms_xslprocessor.Processor;
v_stylesheet dbms_xslprocessor.Stylesheet;
v_clob clob;
...
transformer := PKG_STUFF.getXSL();
v_transformer := dbms_xmldom.newDOMDocument(transformer);
v_XSLprocessor := Dbms_Xslprocessor.newProcessor;
v_stylesheet := dbms_xslprocessor.newStylesheet(v_transformer, '');
...
for source_data in (select id in source_tbl) loop
begin
    v_doc := PKG_CONVERT.convert(in_id => source_data.id);
    --start time of operation
    v_begin_op_time := dbms_utility.get_time;
    --reset the CLOB                    
    v_clob := ' ';
    --Apply XSL Transform
    dbms_xslprocessor.processXSL(p => v_XSLprocessor, ss => v_stylesheet, xmldoc => v_Doc, cl => v_clob);
    v_doc := dbms_xmldom.newDOMDocument(XMLType(v_clob));
    --end time
    v_end_op_time := dbms_utility.get_time; 
    --calculate duration
    v_time_taken  :=  (((v_end_op_time - v_begin_op_time)));
    --log the duration
    PKG_LOG.log_message('Time taken to transform XML: '||v_time_taken);
    ...
    ...
    DBMS_XMLDOM.freeDocument(v_Doc);
    DBMS_LOB.freetemporary(lob_loc => v_clob);
end loop;

The time taken to transform the XML is slowly creeping up (I suppose it might also be the call to dbms_xmldom.newDOMDocument, but I had thought that to be fairly straightforward). I have no idea why…. 🙁

(Oracle 10g)

UPDATE:

Further testing by simply commenting out the call to processXSL seems to speed things up significantly. Still waiting for larger dataset test to confirm this, but it seems that processXSL is what’s really bogging things down. Has anyone else had problems with it before?

We’re not transforming many XML documents, only a few thousand right now. The XSL is not exactly simple, but I’m only creating one Processor, one Transformer, and one Stylesheet, and then reusing them over and over and over…

UPDATE 2:

Even without transformations, the memory usage keeps growing. Not nearly bad enough to crash, but it still shouldn’t be doing this. Very puzzling.

UPDATE 3:

So… our DBA found references somewhere to the fact that there were known memory leaks in dbms_xmldom and possibly in dbms_xslprocessor. The problems were fixed in newer versions of Oracle, but we do not have those versions, and since there is no immediate plan to upgrade, we have to code around this.

  • 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-14T17:08:01+00:00Added an answer on May 14, 2026 at 5:08 pm

    As I mentioned, it looks like there were known memory problems in the packages we were using, and the version of Oracle I’m using does not have the fixes applied. I found I was able to code around them.

    Originally, I was using dbms_xmldom to build up an XML document out of pieces. I replaced this code with SELECT (into … from dual) statements and the XML functions: xmlelement, xmlconcat, xmlagg, xmlforest.

    To perform the transformation, the XMLType API has a transform function which I used instead of the dbms_xslprocessor package. It runs slower, but seems much more consistent (in speed and memory usage) and does not crash the system when it runs out of memory. 🙂

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

Sidebar

Ask A Question

Stats

  • Questions 397k
  • Answers 397k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The only solution I found is to call sizeToFit programmatically… May 15, 2026 at 3:18 am
  • Editorial Team
    Editorial Team added an answer Why build when you already have an open source application… May 15, 2026 at 3:18 am
  • Editorial Team
    Editorial Team added an answer You are requiring a classfile on line three... use require_once(),… May 15, 2026 at 3:18 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.