Hi again mario,
Yes in my case it would be nice for generated classes to be garbage collected when no
longer referenced : for long-lived virtual machines where rules are changed a lot, you
really hit the max perm gen quickly enough.
I guess what you are describing is a production environment where rules are
loaded/compiled once in the VM's life (startup time most probably) and that's it.
That's not my case, it's rather the reverse in some cases, as specialized users
can test their rule sets in the same environment as the production one and choose to
release them.
Your option to control JITing space looks like a good way to keep things in check. Would
it possible to ensure if we set the space to 0, it actually disables it? That would ensure
that everything runs in my calling threads and gets garbage collected right?
Again thanks a mil for your help
Date: Wed, 4 Jul 2012 06:31:00 -0700
From: mario.fusco(a)gmail.com
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] Migrating from 4.0.7 to 5.4.0.Final
Hi again,
You are looking at the correct branch and I didn't change the MvelConstraint
class indeed. What I did is to change the ClassGenerator to try to avoid the
creation of new ClassLoaders (when possible).
Said that what I don't understand is why you expect the generated classes to
be garbage collected. They are used to evaluate the constraints in your
rules, so I don't think they could/should be CG'd anyway. Am I missing
something?
Anyway we are realizing that the required PermGen space could be a problem
especially if you have a big rule base, so I am going to add a configuration
option that will allow you to define how many space you want to give to
these JITted constraints. Once the engine will hit this limit it will just
stop JITting further constraints leaving them run in interpreted mode.
Hopefully the users will be able to find a good trade-off between
performances and memory occupation in this way. Does this make sense to you?
Mario
--
View this message in context:
http://drools.46999.n3.nabble.com/Migrating-from-4-0-7-to-5-4-0-Final-tp4...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users