The first question is what are you storing in your knowledge session and in particularly
are you retracting facts when they are no longer relevant or are you accumulating
duplicate values?
Is you knowledge session growing over time is it the memory usage of it staying level?
I've not done it personally but I believe it's pretty simple to persist a
knowledge session if that is the approach you choose.
Thomas
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of Johannes Meier
Sent: 19 May 2010 11:08
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Optimizing the size of a
StatefulKnowledgeSessionobject.
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-StatefulKnowledgeSess...
object-tp828728p828728.html
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************