Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2343#discussion_r157230846
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/RouteText.java
---
@@ -209,6 +215,30 @@
private volatile Map<Relationship, PropertyValue> propertyMap = new
HashMap<>();
private volatile Pattern groupingRegex = null;
+ @VisibleForTesting
+ final static int PATTERNS_CACHE_MAXIMUM_ENTRIES = 10;
--- End diff --
We could probably cache more than 10 here. I think the idea on the PR was
simply to convey that we need a reasonable upward bound, rather than allowing
it to grow indefinitely. I would tend to lean more toward say 100 personally?
Or even 1024 or so. A compiled Pattern is fairly small I believe in terms of
heap utilization, so I wouldn't be concerned personally with such a limit.
---