Reactor: enable to reuse RuleIndex from token in non-incremental mode.

This commit is contained in:
Fedor Isakov 2020-08-20 12:08:57 +02:00
parent 89843bfac4
commit 4e89325d47
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ internal class EvaluationSessionImpl private constructor (
val invalidFeedbackKeys: Set<Any>
if (!incrementality.ability().allowed() || token == null) {
val ruleIndex = RuleIndex(program.rulesLists())
val ruleIndex = token
?.let { (it as SessionTokenImpl).ruleIndex }
?.also { it.updateIndex(program.rulesLists(), rulesDiff.removed) }
?: RuleIndex(program.rulesLists())
val logicalState = LogicalState()
val processing = ConstraintsProcessing(