[rules-users] Optimizing the size of a StatefulKnowledgeSession object.

Johannes Meier HeSpringer at gmx.de
Wed May 19 06:07:36 EDT 2010


Dear Drools' developers and users,

I have a problem regarding the size of my Drools' StatefulKnowledgeSession. 
As I'm working with a 'stateful' session that lives on a web server I have
bound this session onto my web session. That means the Drools' session is
able to access some facts from preceding calls. The Drools' session lives as
long as the web session lives.

So far so good. Now I've started to mesure the size of the
StatefulKnowledgeSession by usage of heap dumps and some profiling tools.
This yielded a size of approximately 5 MB.

Is there any approach to optimize the size of a StatefulKnowledgeSession?
Apparently this object has a lot of overhead (from my point of view)
regarding the Drools Flow and Gouvenor frameworks because I'm not utilizing
this frameworks at all (just Drools Expert). Maybe this is an approach to
optimize the session's size?

If I accept this size, is there a convenient way to serialize the
StatefulKnowledgeSession between calls? I'm thinking about storing the whole
StatefulKnowledgeSession inside the database or maybe some datastructure
apart from the websession. Every call inside one web session would have to
lead to a deserialization, application and serialization of Drools' session. 

Thank you in advance for any reply.

Kind regards!
Johannes
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Optimizing-the-size-of-a-StatefulKnowledgeSession-object-tp828728p828728.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list