[ https://issues.apache.org/jira/browse/XALANJ-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12539603 ]
Mike Atkin commented on XALANJ-2407: ------------------------------------ It looks like it will be hard to move the generation to the constructor given the Exceptions that are are thrown from the defineTransletClasses() method while maintaining backwards compatability. I've attached a small patch to fix this using the original suggestion, which also removes the unused getter and setter for that field (doesn't seem to be any need for them). > 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 > > Attachments: XALANJ-2407.diff > > > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]