From: Changgyu Choi Date: Thu, 19 Dec 2024 00:32:47 +0000 (+0900) Subject: Skip tizen_launch_appinfo_set_pid() for fast launched apps. X-Git-Tag: accepted/tizen/unified/20241221.103406~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5eb76e83c311392a62761398e308d16366a4bfbf;p=platform%2Fcore%2Fappfw%2Fapp-core.git Skip tizen_launch_appinfo_set_pid() for fast launched apps. In order to shorten the app initialization time, the fast launched app is modified to skip the wayland init. Change-Id: I6f1497457c9f338dadf3ae4415cb66e054a75f6d Signed-off-by: Changgyu Choi --- diff --git a/tizen-cpp/app-core-ui-cpp/app_core_ui_base.cc b/tizen-cpp/app-core-ui-cpp/app_core_ui_base.cc index 347f7fc..6f007bc 100644 --- a/tizen-cpp/app-core-ui-cpp/app_core_ui_base.cc +++ b/tizen-cpp/app-core-ui-cpp/app_core_ui_base.cc @@ -63,6 +63,9 @@ class AppCoreUiBase::Impl : public AppCoreRotation::IEventListener { handler_(std::make_shared(parent)), wl_handler_(new WaylandHandler()), wp_manager_(new WindowPositionManager()) { + const char* fast_launch = getenv("AUL_FAST_LAUNCH"); + if (fast_launch != nullptr) + fast_launch_ = true; } private: @@ -148,6 +151,7 @@ class AppCoreUiBase::Impl : public AppCoreRotation::IEventListener { std::unique_ptr wp_manager_; std::unique_ptr thread_; std::unique_ptr rotation_; + bool fast_launch_ = false; }; AppCoreUiBase::AppCoreUiBase(unsigned int hint) @@ -513,10 +517,15 @@ void AppCoreUiBase::DoRun(int argc, char** argv) { impl_->SetWindowPosition(b); } - if (impl_->hint_ & HINT_WINDOW_ID_CONTROL) - impl_->SetAppId(); + if (!impl_->fast_launch_) { + if (impl_->hint_ & HINT_WINDOW_ID_CONTROL) + impl_->SetAppId(); + + impl_->SetAppInfo(); + } else { + _I("Skip wayland init for fast-launched app"); + } - impl_->SetAppInfo(); AppCoreBase::Run(argc, argv); }