I wanted to know if i can dynamically update rules in a kie container .
Scenario: I have a global KieFileSystem and every time a new rule is added i am writing to this file System. After that i am creating a Kie Module using KieBuilder using the updated KieFileSystem.Then i am using the Release Id of this kie Module to update my kie container to Version using updateToVersion() Using drools and kie version 8.31.0.Final
Problem: For large number of complex rules updateToversion is recomiling all rules including the previously compiled ones in the kie container thereby increasing execution time.
Requirement: I want to add the new rules to the kie container without recompiling the already compiled rules.
My approach to this problem : Creating a new FileSystem when a new rule is added containing only the new rule and use this file system to add to a global list of kieContainers by creating a new container everytime a rule is added. During rule execution I am executing all the containers in the list. This is not a good approach as it involves creation of several containers
I would like to know if it is possible to do this operation in a more efficient way .
THANKS IN ADVANCE