On Tue, 12 Sep 2023 13:54:34 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> You haven't make the case for these changes, please describe the use cases 
> when performance is a significant constraint on application performance. The 
> changes largely just add more code to maintain without otherwise adding 
> sufficient value.

Many scenarios require this optimization, such as:

1. The open source project [datax](https://github.com/alibaba/datax) is a data 
integration engine we maintain. When the input is a Date but the target type is 
String, the Date must be converted to String. In the flame graph below, 
commons-lang's FastDateFormat::format method consumes most of the time. It will 
be similar if replaced by DateTimeFormatter::format.
![image](https://github.com/openjdk/jdk/assets/1166785/1063aacf-c770-4c2d-9920-297be65ac6b0)


2. JSON libraries such as gson/jackson/fastjson need to convert Date/Instant 
into String, and format/toString usually takes up a relatively large proportion 
of time.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15658#issuecomment-1715842265

Reply via email to