2010/4/1 miguel machado <mls.machado(a)gmail.com>:
2010/3/31 Edson Tirelli <ed.tirelli(a)gmail.com>
>
> 1. Do you use one KnowledgeBuilder to compile all your rule files or do
> you use one KnowledgeBuilder per file?
Just one, declared as a static variable.
That wastes, whatever the KB takes, for the remaining duration of the program
execution. After you have taken the compiled packages from the KB and
checked for errors, the KB has done his duty the KB can go :-)
>
> 5. Did you tried compiling it once, generating the kbase and serializing
> it to a file, and then, instead of recompiling everything, just deserialize
> the file into memory and using it? How much memory it consumes when you
> deserialize from a file?
Not sure what you mean there, is it
this: http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-exp...
if so, yes, i've tried it and noticed no difference at all, was i supposed
to?
For the application that just does the load part (reading the KPs from
an input stream), yes: that
should reduce memory usage.
It certainly does not, if your KB is static, and you compile and load
in the same program,
just serializing and deserializing in between.
-W