I have a server that gets request and use DROOLS to evaluate the request.
For each incoming request I create a new statefull session, insert facts (can be more than 100 facts), fire all the rules and dispose of the session.
I find that every insert of a fact causes drools to go to ProjectClassLoader.loadClasss()
which is synchronized
and blocks my threads (I'm running up to available processor threads with service executor, and this causes performance issues).
It is important to illustrate that all the fact in question are identical. we use multiple threads to evaluate several different request that have the same code as the facts. We would expect Drools to not have to reload the classes over and over again.
Any idea how we can avoid having drools go to the synchronized
loadClass()
code for every single insert?