Skip to content

PERF: Improve FunctorImageFilter performances

Luc Hermitte requested to merge lhermitte/otb:line_progress into develop

Summary

Improve slightly the performances of otb::ImageFunctorFilter.

Rationale

otb::ImageFunctorFilter with a lambda is slightly less performant than itk::UnaryFunctorImageFilter with a dynamic functor.

Implementation Details

itk::UnaryFunctorImageFilter only updates the progress reporter once per line.

This MR mimics ITK behaviour.

Results

The performance improvement is small, less than 10% on simple filters like a scaling filter that multiplies pixel values. The gap seems to have been filled.

Copyright

The copyright owner is CNES and has signed the ORFEO ToolBox Contributor License Agreement.


Check before merging:

  • All discussions are resolved
  • At least 2 👍 votes from core developers, no 👎 vote.
  • The feature branch is (reasonably) up-to-date with the base branch
  • Dashboard is green
  • Copyright owner has signed the ORFEO ToolBox Contributor License Agreement

Merge request reports

Loading