From 31feec915d92a3b142144eb1dd05e69ed04dcf01 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 26 Sep 2022 02:35:54 +0000 Subject: [PATCH] Use modified tizen_base::Parcel To improve the performance of the parcel creation, the implementation of the Parcel is changed. It uses malloc() instead of std::vector. Requires: - https://review.tizen.org/gerrit/#/c/platform/core/base/bundle/+/281779/ Change-Id: Iba427db6a0e5624fdb6cc5a0b0290cc4960d3fa0 Signed-off-by: Hwankyu Jhun --- src/esd_cion/cion_ondemand_server.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/esd_cion/cion_ondemand_server.cc b/src/esd_cion/cion_ondemand_server.cc index 2493ac3..13f9923 100644 --- a/src/esd_cion/cion_ondemand_server.cc +++ b/src/esd_cion/cion_ondemand_server.cc @@ -171,7 +171,7 @@ void CionOndemandServer::OnOndemandListRequested( std::string list_service_name = ondemand_parcel.ReadString(); _D("Ondemand Service_name : %s", list_service_name.c_str()); if (list_header == std::string("OndemandList")) { - raw = GetOndemandList(list_service_name).GetRaw(); + raw = GetOndemandList(list_service_name).ToRaw(); if (raw.size() == 0) return; } @@ -278,7 +278,7 @@ void CionOndemandServer::LoadOndemandServiceList() { std::shared_ptr pi = std::make_shared(std::string(service_name), - parcel.GetRaw().data(), parcel.GetRaw().size()); + parcel.GetData(), parcel.GetDataSize()); ondemand_peer_list_.emplace_back(pi); free(uuid); @@ -319,8 +319,8 @@ void CionOndemandServer::AddOndemandServiceList(std::string service_name, parcel.WriteString(display_name); std::shared_ptr pi = - std::make_shared(service_name, parcel.GetRaw().data(), - parcel.GetRaw().size()); + std::make_shared(service_name, parcel.GetData(), + parcel.GetDataSize()); ondemand_peer_list_.emplace_back(pi); free(uuid); @@ -365,4 +365,4 @@ tizen_base::Parcel CionOndemandServer::GetOndemandList( parcel.WriteBool(false); return parcel; -} \ No newline at end of file +} -- 2.7.4