TouK / excel-export

excel-export grails plugin
58 stars 32 forks source link

Performance optimisation #25

Closed jamespage closed 7 years ago

jamespage commented 9 years ago

Performance optimisation changing "object.properties.containsKey(propertyName)" to (object.hasProperty('propertyName') ? true : false);

This uses Groovy Native methods to check if the property is there or not. This saves a hashMap having to be passed back. This can have a time saving especially where the object references other Objects. On the shouldFillRowAtPosition test I getting an improvement from 1.891 to 0.447. On the other tests I am seeing a performance increase as well.

Changes to be committed: modified: src/groovy/pl/touk/excel/export/getters/PropertyGetter.groovy