When I run my kogito quarkus drl project using maven mvn quarkus:dev, the rules extension gets loaded (I see it load during the build step). I test my project and the rules run very fast. Then, I run the same quarkus project inside a docker container and the rules extension doesn’t seem to load during quarkus startup. I test the app and the same rules run much slower inside the container. How can I get quarkus to load the rules extension at startup in side the container similar to the way maven loads the rules extension during the build step?
I tried to create a mutable-jar and added the build env var to quarkus app jar execute. But the doco says that is only for dev and not prod. So, what to use in prod??? I am confused on why prod mode does not load the rules extension.
Update: After time testing various options, I found the speed of the rules varies based on application launch method.
I pulled the kogito-drl-quickstart from github. Then, I ran the following locally:
When I launch the application in maven dev mode (mvn quarkus:dev), the rule speed was on average about 10ms.
When I launch the application in JVM mode (java -jar target/quarkus-app/quarkus-run.jar), the rule speed was on average about 50ms.
When I launch the application in native mode (target/kogito-drl-quickstart-1.0.0-SNAPSHOT-runner), the rule speed was on average about 5ms.
Based on all this, my conclusion is: if you are looking for fast prod rule speed, native execution is for sure the way to go with kogito. The plain JVM execution is very slow if your application has many rules and large data sets running through them.