apache / carbondata

High performance data store solution
carbondata.apache.org
Apache License 2.0
1.43k stars 704 forks source link

[SDK Optimization] Multiple SimpleDateFormat initialization in CarbonReader #4281

Open zhangboren93 opened 2 years ago

zhangboren93 commented 2 years ago

I found that reading carbon files from CarbonReader takes long time in "SimpleDateFormat.", see attached file for output of profiling.

https://github.com/apache/carbondata/blob/4b8846d1e6737e7db8a96014818c067c8c253d1f/sdk/sdk/src/main/java/org/apache/carbondata/sdk/file/CarbonReader.java#L207

I wonder if it is OK if we add some lazy initialization to SimpleDateFormat in the class, and if so should it support multi-threading.

profile.zip

prajwalbandak commented 1 year ago

hey @zhangboren93 , Can you please assign to me and please explain the issue?