RFR: 8209120: Archive the Integer.IntegerCache (original) (raw)

Claes Redestad claes.redestad at oracle.com
Thu Aug 9 12:58:53 UTC 2018


On 2018-08-09 13:42, Stephen Colebourne wrote:

On 9 August 2018 at 12:33, Claes Redestad<claes.redestad at oracle.com> wrote:

using the new ability to archive immutable heap graphs into the CDS archive, even archiving small things like the Integer.IntegerCache can be profitable. Interesting. I did consider caching some instances of LocalDate when I was developing JSR-310 (say 1 year either side of the current date at startup). Maybe an avenue to investigate in the future!

As long we stay invariant with system time, time zone etc.. LocalDates should be fine.

Archives can potentially be long lived, however, so caching a range of LocalDates that is centered around the system time when creating the archive might lead to degrading startup over time. Not sure that's a pleasant property to have.

/Claes



More information about the core-libs-dev mailing list