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

David Holmes dholmes at openjdk.org
Fri Mar 10 02:57:10 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.

LGTM2

Thanks

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-runtime-dev mailing list