You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been doing some profiling using the chronicle appender with JSON output. It looks like the FastDateFormat used by FormattedTimestampJsonProvider is creating a calendar with `newCalendar and formatting it every time, which creates unnecessary garbage and is a good chunk of the JSON formatting.
Luckily the switch to DateTimeFormatter is already implemented in #377, but not merged yet. It's not fully backwards compatible, so it will require a major version bump. I was holding off on merging it to see if there were any other major (non-backwards compatible) changes that needed to be made, that could be grouped with it. And I wasn't in a rush to merge it, because FastDateFormat has worked for a long time. If it is causing serious problems, I'll consider merging it and bumping the major version soon.
@philsttr I think there's a smaller workaround, which is to use a format(calendar, buf) and reuse the calendar instances. Not sure how much of an improvement that would be as I haven't benchmarked it.
I've been doing some profiling using the chronicle appender with JSON output. It looks like the FastDateFormat used by FormattedTimestampJsonProvider is creating a calendar with `newCalendar and formatting it every time, which creates unnecessary garbage and is a good chunk of the JSON formatting.
https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java#L444
It might be good to use DateTimeFormatter.ISO_DATETIME_FORMAT directly and compare it.
The text was updated successfully, but these errors were encountered: