From f58c74485e04f04fbf43edae2c8e039a3e70eef2 Mon Sep 17 00:00:00 2001 From: Woongsuk Cho Date: Tue, 24 Jul 2018 20:07:47 +0900 Subject: [PATCH] caching tpa list for optimization Change-Id: I7853ff5979afbfdd88bb55910ddd89087ebec1ba --- NativeLauncher/installer-plugin/ni_common.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NativeLauncher/installer-plugin/ni_common.cc b/NativeLauncher/installer-plugin/ni_common.cc index 8c200ce..f9e81b8 100644 --- a/NativeLauncher/installer-plugin/ni_common.cc +++ b/NativeLauncher/installer-plugin/ni_common.cc @@ -58,6 +58,7 @@ static const char* __CROSSGEN_PATH = __STR(CROSSGEN_PATH); #undef __XSTR static int __interval = 0; +static std::string __tpa; static void waitInterval() { @@ -138,12 +139,11 @@ static void crossgen(const std::string& dllPath, const std::string& appPath, boo return; } } else { - std::string tpa = getTPA(); std::string jitPath = getRuntimeDir() + "/libclrjit.so"; std::vector argv = { __CROSSGEN_PATH, "/nologo", - "/Trusted_Platform_Assemblies", tpa.c_str(), + "/Trusted_Platform_Assemblies", __tpa.c_str(), "/JITPath", jitPath.c_str() }; @@ -272,6 +272,8 @@ int initNICommon(NiCommonOption* option) return -1; } + __tpa = getTPA(); + return 0; } @@ -281,6 +283,8 @@ void finalizeNICommon() finalizePluginManager(); finalizePathManager(); + + __tpa.clear(); } -- 2.7.4