Thanks Jan for the detailed instructions. I will give it a shot. Rakesh
From: Jan Haderka <[email protected]<mailto:[email protected]>> Reply-To: Magnolia User-List <[email protected]<mailto:[email protected]>> Date: Tue, 2 Nov 2010 02:40:11 -0500 To: Magnolia User-List <[email protected]<mailto:[email protected]>> Subject: Re: [magnolia-user] Reduce module install memory footprint The problem is the size of the session and validation of all the nodes when saving it. When you import in small chunks, the session is saved after each import and it never grows too big. During the module installation, changes are not saved so that we can rollback the install in case it fails, so you get in the same situation as if when importing all from single file. That being said, your options are limited. The only solution would be to break transactionality of the install. If you want to go that way, you need to Override BootstrapResourceTask (or one of the extending classes) and in the place where it calls BootstrapUtil you need to import the resource yourself, probably by doing exactly same thing as BootstrapUtil, but calling DataTransporter.importXmlStream() with the true set for "saveAfterImport" parameter. In addition, you would want to override getBasicInstallTasks() of your module version handler and replace Bootstrap task returned by the super call to this method with your own. As I said above, this will break transactionality of the install, so you need to also plan for contingency in case of install failure and re-runing the installation ... either you delete all the content that exists under the path you are importing prior the import, or you change the uuidBehavior of the import to automatically replace conflicting nodes instead of failing or ... each of the options here have some drawbacks in the possibility of removing accidentally something you didn't really want to remove. HTH, Jan On Nov 1, 2010, at 9:51 PM, Rakesh Vidyadharan wrote: What options exist for trying to reduce the memory footprint during a module install? Our workspace export is about 140Mb, and doing a first time install of Magnolia (including our module) requires about 4G of heap. I tried importing the XML export directly into a standalone JackRabbit repository, and it takes about 2.5G of heap. So, I exported various parts of our workspace, and now the largest export file is only about 7Mb in size. I can easily import all of the files and restore our workspace into a standalone JackRabbit repository in under 512Mb of heap. But the Magnolia module installation still requires about 4G of heap (anything less and I get out of memory exceptions). So, the basic question is how would I go about reducing the memory requirement? I took a look at the module version handler, but am not sure what I would over-ride in there to try and reduce the memory requirement. My initial suspicion is that all the imports are being handled in the same session transaction leading to memory bloat. Is that what happens? Thanks in advance for any directions on how to handle this. Rakesh ________________________________ ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]<mailto:[email protected]>> ---------------------------------------------------------------- ________________________________ ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]<mailto:[email protected]>> ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
