[ 
https://issues.apache.org/jira/browse/COCOON-1574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jasha Joachimsthal reopened COCOON-1574:
----------------------------------------


JXPathHelper.getAttribute() now always returns an Object of type String instead 
of any Object which breaks implementations that do not expect a String.

> Memory Leak with XMLFileModule
> ------------------------------
>
>                 Key: COCOON-1574
>                 URL: https://issues.apache.org/jira/browse/COCOON-1574
>             Project: Cocoon
>          Issue Type: Bug
>          Components: * Cocoon Core
>    Affects Versions: 2.2
>         Environment: Operating System: Windows XP
> Platform: PC
>            Reporter: Ron Blaschke
>            Assignee: Ralph Goers
>             Fix For: 2.1.11
>
>
> I'm currently looking into a memory leak issue at Apache Forrest.  Forrest's
> site currently needs to be built with -Xmx128m because of this.  I believe the
> issue is originated at Cocoon's LinkRewriterTransformer or XMLFileModule.
> A memory profiler shows lots (30MB+) of DOM DocumentImpls (150+ objects), 
> which
> get referenced by XMLFileModule.DocumentHelper.  Their URIs are linkmap-xxx.
> LinkRewriterTransformer#createTransformedLink(String) uses a 
> InputModuleHelper,
> which seems to reference a XMLFileModule.
>   ...
>   newLink = (String) modHelper.getAttribute(this.objectModel,
>                      ^^^^^^^^^
>   ...
> The XMLFileModule keeps the visited documents in a map, which is where they
> build up.
> Just for testing, I changed XMLFileModule#getDocumentHelper(Configuration) 
> from
>   this.documents.put(src, new DocumentHelper(reload, cache, src, this));
> to
>   return new DocumentHelper(reload, cache, src, this);
> Thus, a new DocumentHelper is created every time, instead of caching them.  
> The
> result: No more memory problems, Apache Forrest's site builds again with 
> -Xmx32.
> Ron

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to