Method for disabling fuzzy matching in BeanWrapperFieldSetMapper [BATCH-1801] #1788
While using BeanWrapperFieldSetMapper in a flat file reader we discovered that it was spending time iterating over all the properties in the mapped object. For every line in the file. Processing time was down to one third when we stopped using BeanWrapperFieldSetMapper.
We had set the distance to 0 (we don't need fuzzy matching), but still it did looping through the properties. It seems to me one should be able to disable this fuzzy matching either by:
The following code is the simplistic code we needed to run much faster. This requires exact match between name and property:
Referenced from: commits cae3f33
Backported to: 4.2.0.M3
The text was updated successfully, but these errors were encountered:
Emmanuel Vasseur commented
I have make some tests with the new 2.1.9.RELEASE (BATCH-1813 fix), and the fixed BeanWrapperFieldSetMapper is slowest than this code.
Reading 10000 lines with 50 fields takes :
In the BeanWrapperFieldSetMapper code, this is the call to the getBeanProperties which takes this 500ms.
Mahmoud Ben Hassine commented
I do confirm the issue, fuzzy matching is performed even when exact matching (distanceLimit = 0) is requested. I applied a change to bypass fuzzy matching when distanceLimit = 0 and this improves the performance by a factor of 1.5 (See JMH benchmark here).
Thank you for raising this issue!