You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2019/07/29 14:37:45 UTC

[GitHub] [groovy] NecOnIce commented on issue #968: Fixed the Reference of the metaclass in ClassInfo.java to use a Weak…

NecOnIce commented on issue #968:  Fixed the Reference of the metaclass in ClassInfo.java to use a Weak…
URL: https://github.com/apache/groovy/pull/968#issuecomment-516019195
 
 
   Sry for my very late response. The behavior which constantly recreates the metaclass is really no suitable solution and i agree that my Request therefore is no solution as well. 
   The Problem where i have observed the behavior of using nearly the maximum amount of memory was an application which loads Strings out of a Database which represents Rules for calculating prices. These are loaded many times a hour. Each time a purchase was made, a request is fired against the database and a String is evaluated. For each such request Groovy creates a new script class and a corresponding metaclass. I was able to free the created Script classes but not the metaclasses. I think the Problem here lies in the fact, that groovy can't know if it should keep the metaclass for later recreations or not ... Could it be possible to manually free all metaclasses of a GroovyShell by calling a method on it? Like the  resetLoadedClasses() method? So as a programmer i'm able to free specific metaclasses this way?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services