From 27361686897b4676b9a09062edbca6813edc4cc9 Mon Sep 17 00:00:00 2001 From: wbdu Date: Thu, 24 Mar 2022 18:01:24 +0800 Subject: [PATCH 1/2] Modify the unnecessary dependencies of worker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Describe:Delete the "//foundation/ace/napi:ace_napi_quickjs" of deps. Signed-off-by: wbdu --- jsapi/BUILD.gn | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jsapi/BUILD.gn b/jsapi/BUILD.gn index 67d4ff5..2c2fc1c 100644 --- a/jsapi/BUILD.gn +++ b/jsapi/BUILD.gn @@ -25,10 +25,7 @@ ohos_shared_library("worker") { "worker/worker_runner.cpp", ] - deps = [ - "//foundation/ace/napi:ace_napi", - "//foundation/ace/napi:ace_napi_quickjs", - ] + deps = [ "//foundation/ace/napi:ace_napi" ] if (is_standard_system) { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] -- Gitee From b1a678e9f4100b4f3a279c02740bec52f3ab2ae8 Mon Sep 17 00:00:00 2001 From: wbdu Date: Thu, 24 Mar 2022 19:54:18 +0800 Subject: [PATCH 2/2] Modify the value of worker's upper limit Describe:Changed the worker's upper limit from 50 to 8. Signed-off-by: wbdu --- jsapi/worker/worker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsapi/worker/worker.cpp b/jsapi/worker/worker.cpp index 525508a..511167f 100644 --- a/jsapi/worker/worker.cpp +++ b/jsapi/worker/worker.cpp @@ -16,7 +16,7 @@ #include "worker.h" namespace OHOS::CCRuntime::Worker { -const static int MAXWORKERS = 50; +const static int MAXWORKERS = 8; static std::list g_workers; static std::mutex g_workersMutex; -- Gitee