Skip to content

Reduce formatter initializations in DefaultFieldSet #4548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Reduce formatter initializations in DefaultFieldSet #4548

wants to merge 1 commit into from

Conversation

hpoettker
Copy link
Contributor

Resolves #1694.

The PR addresses the problem that the default value for the field numberFormat of DefaultFieldSet is currently initialized twice: Once by the assignment in the declaration and once in the constructor. As the construction of the default number format is expensive, this should be avoided.

It also addresses the problem that the expensive construction of the default numberFormat and dateFormat currently cannot be avoided in the case where the default values are overwritten after calling the constructor.

@fmbenhassine
Copy link
Contributor

LGTM. Rebased and merged as 75abf15. Thank you for your contribution!

@hpoettker hpoettker deleted the default-field-set branch May 7, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issue in DefaultFieldSet due to the usage of SimpleDateFormat
2 participants