logstash-plugins / logstash-filter-mutate

Apache License 2.0
16 stars 75 forks source link

filter method performance #5

Closed colinsurprenant closed 8 years ago

colinsurprenant commented 10 years ago

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.

talevy commented 8 years ago

is #70 what you had in mind?

talevy commented 8 years ago

Closing after performance benchmarks show this not to be necessarily faster, and it complicates the flow. closing.