What version of SwitchYard are you using? And are you using a manifest/resources or manifest/container? If using the manifest/resources configuration option, then it should pre-load a knowledge base on deployment.
We're using 1.1.0-Final, and we're using manifest/resources. If, as you say, theres a kb loaded on deployment, is there some way i can monitor what's going on around the kb when the rules are fired, so that i can try and work out what it's doing under the covers? classes/methods to breakpoint so i can sneak a peek, or logging levels i can turn up to get further info? I know i could add loggers/event listeners in via the switchyard file but i just wondered if there's anything built in i can use first?
After some further investigation and deep log analysis i've managed to nail down that it's actually not drools that's running slowly (in fact drools is running blindingly fast as i'd hope), it's actually hitting a DB stored procedure that's taking ~14 seconds on first hit, and we appear to be having some speed issues around connection pooling, so i'll look to get the admins to increase the min pool size etc to ensure there are always some available connections ready to pick up, and talk to the DB guys about what their proc does.
thanks for the help though, it's nice to know that it does load the kbase on startup.
Wow - good find!
If you can't get the stored proc optimized, you could implement some kind of startup listener on your application that triggers the stored procedure during deployment, such that real users won't feel the hit.