ijokarumawak commented on a change in pull request #3504: NIFI-6318: Support EL 
in CSV formatting properties
URL: https://github.com/apache/nifi/pull/3504#discussion_r291482844
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/csv/CSVReader.java
 ##########
 @@ -108,23 +106,14 @@
     }
 
     @OnEnabled
-    public void storeCsvFormat(final ConfigurationContext context) {
+    public void storeStaticProperties(final ConfigurationContext context) {
+        this.context = context;
+
         this.csvParser = context.getProperty(CSV_PARSER).getValue();
-        this.csvFormat = CSVUtils.createCSVFormat(context);
 
 Review comment:
   I may be overly concerned, but since CSV format is widely used, I wonder if 
it affects performance negatively by creating CSV format every time. Do you 
know how computational it is? If it takes even few milli seconds, it may be 
worthwhile to add a simple logic to create a static CSV format in case no 
property uses EL. We want to avoid affecting existing use-cases negatively as 
much as possible.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to