I think we can improve the performance of the filter method by replacing the "linear" if sequence evaluation with an exact list of mutations that must be performed. This list could be constructed in the register method and the filter method would just go through that list of mutations to perform.
So, for example, if there is only one mutation to do, say a remove, then only the remove mutation would be called instead of evaluating 12 if statements.
I think we can improve the performance of the
filter
method by replacing the "linear" if sequence evaluation with an exact list of mutations that must be performed. This list could be constructed in theregister
method and thefilter
method would just go through that list of mutations to perform.So, for example, if there is only one mutation to do, say a
remove
, then only the remove mutation would be called instead of evaluating 12if
statements.