Optimization of Concatenate VectorImage Filter (from 28M cycles to 8M cycles)
Mantis Issue 1040, reported by lhermitte, assigned to rkanavath, created: 2015-05-04
Useless reallocation were done in OTB 3.16.
Here is a patch that makes the use of Concatenate VectorImage Filter goes down from 28M cycles 8M cycles (measured by callgrind on a program compiled with -O2 -g -DNDEBUG)
The idea behind the patch is to avoid to construct and resize the output pixel at each iteration. For a given set of input and output images, the dimension of the output pixel has no reason to change.
This way we avoid useless free+alloc cycles.
1431526645 - rashadkmpatch tested with OTB 4.5
1431527291 - rashadkmpatch pushed for OTB 4.5 - waiting for a next dashboard submission.