[Webtest] [webtest][JIRA] Created: (WT-87) Addressing the OutOfMemory issue in reporting

Denis N. Antonioli (JIRA) webtest@lists.canoo.com
Fri, 16 Sep 2005 12:10:43 +0200 (CEST)


Addressing the OutOfMemory issue in reporting
---------------------------------------------

         Key: WT-87
         URL: http://webtest-community.canoo.com/jira/browse/WT-87
     Project: WebTest
        Type: Bug
    Reporter: Denis N. Antonioli
 Assigned to: Denis N. Antonioli 
     Fix For: 1.7


>From previous discussions and analyses, it looks like the xml reporting is one of the main culprit.

xml reporting works now as follows:
(1) reads the existing report file and build a DOM for it,
(2) convert the testResult (all the java Objects for the steps) into xml Element and inserts them at the end of the DOM,
(3) serializes the DOM back to the report file.

I see two issues with this procedures:
First, it repeatedly reads and converts the report file to DOM, which is a potentially expensive process, and it needs every time more memory since the report file itself is growing.
Then, it converts the testResult from hierarchy of webtest Objects to a DOM, which is also bound to consume memory.

I'm planning to addess the two issues separately.
First, I'd like to get rid of the reading/writing of the result file. I've already done a prototyp that works as follow:
the webtest report xml file is just a container:

In this example, the user set the name of the webtest report file to WebTestReport.xml in the test configuration.
The file WebTestReport.xml contains just:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE summary [
<!ENTITY testresult SYSTEM "WebTestReport_.xml" >
]>
<summary>
&testresult;
</summary>

The file WebTestReport_.xml contains a concatenation of all the <testResult>.

By doing it this way, no changes are required from all the xml processors/xsl stylesheet used to format the reports works.


Then I will suppress the intermediate DOM and serialize the Webtest objects directly to the output file as xml tags.


What do you think?
Good idea? Bad idea? Other proposal? Any pitfall?


I'm hoping for comments ;-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://webtest-community.canoo.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira