You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Henry Zongaro (JIRA)" <xa...@xml.apache.org> on 2007/10/12 16:01:00 UTC

[jira] Commented: (XALANJ-2407) Reduce memory footprint of Templates instances

    [ https://issues.apache.org/jira/browse/XALANJ-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534295 ] 

Henry Zongaro commented on XALANJ-2407:
---------------------------------------

Good point.  I don't see any reason why XSLTC even needs that _bytecodes field - it seems to me it should probably just create the classes from within the constructor.

> Reduce memory footprint of Templates instances
> ----------------------------------------------
>
>                 Key: XALANJ-2407
>                 URL: https://issues.apache.org/jira/browse/XALANJ-2407
>             Project: XalanJ2
>          Issue Type: Improvement
>          Components: XSLTC
>    Affects Versions: 2.7
>            Reporter: Mike Atkin
>            Priority: Minor
>             Fix For: 2.7.1
>
>
> TemplatesImpl retains the bytecode byte[]s for the compiled xsls even after generating the translet classes when there appears no reason for it.  This significantly increases memory usage of Templates objects (by an order of magnitude).  In my application (a small low-volume web app) which keeps a HashMap of 100 or so Templates, 40% of the heap space (64mb configured) is taken up by this data.
> Setting the _bytecodes field to null (possibly adding a system flag or property to control this) at the end of the defineTransletClasses() method in TemplatesImpl fixes this.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org