[Acceleo 3] Problems in memory management [message #647996] |
Mon, 10 January 2011 12:26  |
Eclipse User |
|
|
|
Hi,
When I launch a lot of transformations (using the 'main' Java class generated by Acceleo (main tag on my template)),
I have a problem with the memory management : the heap-status displayed in my Eclipse never decreased.
It seems that memory is not unloaded.
How can I avoid this ?
Thanks for your answer,
Alex
|
|
|
|
|
|
Re: [Acceleo 3] Problems in memory management [message #649448 is a reply to message #648270] |
Wed, 19 January 2011 04:14  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------050808040703090201000804
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
In case any one wonders, the two bugzillas
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334264 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334283 have been opened to
tackle the issues raised by this thread. Both are now fixed and will be
available in 3.0.2RC1 and 3.1.0M5.
Laurent Goubet
Obeo
On 12/01/2011 09:35, Laurent Goubet wrote:
> Hi Alexandre,
>
> UML creating its own Cross referencer is a memory issue we've seen in a
> number of our projects. As Acceleo doesn't explicitely unload the
> resources it loads, you will have to manually take care of it for UML
> resources.
>
> Namely, you will have to override the "doGenerate" method of the
> generated Java launcher (the Java class beside the module which contains
> your "@main" annotation) with a code such as :
>
> /**
> * Launches the generation.
> *
> * @param monitor
> * This will be used to display progress information to the user.
> * @throws IOException
> * Thrown when the output cannot be saved.
> * @generated NOT
> */
> @Override
> public void doGenerate(Monitor monitor) throws IOException {
> super.doGenerate(monitor);
>
> // Unload UML resources (memory issues)
> ResourceSet rs = getModel().eResource().getResourceSet();
> for (Resource resource : rs.getResources()) {
> if (UMLResource.FILE_EXTENSION.equals(resource.getURI().fileExt ension())) {
> resource.unload();
> }
> }
> }
>
> Laurent
>
> On 11/01/2011 17:13, Alexandre Cortier wrote:
>> Hi Laurent,
>>
>> We tested memory : objects are kept by Inverse Cross Referencer of the
>> UML cache adapter.
>> We added break point on the unload statement of the ResourceImpl class :
>> this statement is never called. Is it normal ?
>>
>> Thanks for all,
>>
>> Alexandre Cortier
>>
>>
>
--------------050808040703090201000804
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------050808040703090201000804--
|
|
|
Powered by
FUDForum. Page generated in 0.03454 seconds