Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Out of memory when generating large files with Xpand
[Xpand] Out of memory when generating large files with Xpand [message #903459] Thu, 23 August 2012 13:03 Go to next message
Eclipse UserFriend
Hi all!

I'm currently running into problems when generating very large files with Xpand, as I run out of memory. Unfortunately, it is not an option to just generate smaller files, as the file format and further processing is not in my hands, i.e. its just required to produce them this way.

From what I'm seeing, it seems to me that Xpand is first building up the complete file contents in memory and only after all is generated it is written out to disk. That way its clear that I'll run out of memory eventually. Is there an option to directly write the generated code to file while the script is being executed? If not, what else to do? I'd rather not switch to hardcoded println.

Thanks,
Alex

[Updated on: Thu, 23 August 2012 13:04] by Moderator

Re: [Xpand] Out of memory when generating large files with Xpand [message #903478 is a reply to message #903459] Thu, 23 August 2012 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i dont know of an out of the box solution never the less you could split up your template to generate mutiple files (with the same name)
and configure the outlet to use append mode.

~Christian
Re: [Xpand] Out of memory when generating large files with Xpand [message #903493 is a reply to message #903459] Thu, 23 August 2012 18:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

an option would be to provide an alternative implementation of org.eclipse.xpand2.output.Output that does the job for you. This can be set to the Generator class.

Kind regards,
~Karsten
Re: [Xpand] Out of memory when generating large files with Xpand [message #903844 is a reply to message #903459] Sun, 26 August 2012 07:01 Go to previous message
Eclipse UserFriend
Hi Karsten and Christian,

thanks to both of you for your suggestions, I'll investigate them further.

Best regards,
Alex
Previous Topic:[Acceleo] generating input filename
Next Topic:[Acceleo] Standalone problem
Goto Forum:
  


Current Time: Wed Jul 23 10:16:33 EDT 2025

Powered by FUDForum. Page generated in 0.06680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top