RFR: 8303548: Arguments::get_default_shared_archive_path() should cache the result for future use

Calvin Cheung ccheung at openjdk.org
Fri Mar 10 01:09:01 UTC 2023


On Thu, 9 Mar 2023 21:40:42 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> The method `Arguments::get_default_shared_archive_path()` generates a string containing a path every time it is called. Since this method is idempotent, the string only needs to be constructed once in the lifetime of the VM. This change caches the result of `Arguments::get_default_shared_archive_path()` and ensures the path string is only generated once.

LGTM

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

Marked as reviewed by ccheung (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12963


More information about the hotspot-runtime-dev mailing list