Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.1.7, 1.1.8, 1.1.9
-
Any
Description
In getTurboFilterChainDecision() while iterating over all Turbo Filters java.util.concurrent.CopyOnWriteArrayList.toArray() is called which produces a copy of the whole under lying ArrayList.
If this happens for every log request a lot of unnecessary objects are created which also then need to be garbage collected. This is not at all "turbo"...
The right implementation is in the code itself in a comment in line 58
// for (TurboFilter tf : this) {
There seems to me no sane reason to not use the commented line but create a copy of the underlying array list every time. The inherited class takes care of current writes by copying on every write hence there is no need to copy on every read.
If only one turbo filter is configured this bug does not occur.