Github user dawidwys commented on a diff in the pull request:
https://github.com/apache/flink/pull/6168#discussion_r195719385
--- Diff:
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ---
@@ -697,6 +697,7 @@ private int calculateIncreasingSelfState(int
ignoreBranches, int takeBranches) {
final Stack<State<T>> states = new Stack<>();
states.push(state);
+ ConditionContext<T> context = new ConditionContext<T>(this,
sharedBuffer, computationState);
--- End diff --
How about creating the context only once at the very beginning of
computeNextStates?
---