Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Xpand] Out of memory when generating large files with Xpand
https://www.eclipse.org/forums/index.php/mv/msg/369960/903459/#msg_903459
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]]>Alexander Fried2012-08-23T17:03:25-00:00Re: [Xpand] Out of memory when generating large files with Xpand
https://www.eclipse.org/forums/index.php/mv/msg/369960/903478/#msg_903478
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]]>Christian Dietrich2012-08-23T19:09:08-00:00Re: [Xpand] Out of memory when generating large files with Xpand
https://www.eclipse.org/forums/index.php/mv/msg/369960/903493/#msg_903493
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]]>Karsten Thoms2012-08-23T22:22:53-00:00Re: [Xpand] Out of memory when generating large files with Xpand
https://www.eclipse.org/forums/index.php/mv/msg/369960/903844/#msg_903844
thanks to both of you for your suggestions, I'll investigate them further.
Best regards,
Alex]]>Alexander Fried2012-08-26T11:01:51-00:00