Skip to content

[SDK Optimization] Multiple SimpleDateFormat initialization in CarbonReader  #4281

@zhangboren93

Description

@zhangboren93

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

SimpleDateFormat dateFormat = new SimpleDateFormat(carbonDateFormat);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions