Hi Ilya,

TL;DR: preloading_preinitializing_daemon has been removed in Tizen 3
because the replacement of WRT by Crosswalk made it quite useless.

On the contrary of WRT where each web application was made of 2 (new)
processes to start, the crosswalk model is based on a main browser
process that forks applications => so preloading libraries is now useless.

Also, the multiuser model introduced in Tizen 3 requires applications to
be launched inside different user sessions. As amd daemon runs as root
(or later as system user), we introduced the amd_session_agent which
runs inside each user session to fork/exec the applications with the
proper environment and security.

Even if the amd_session_agent source code comes from the old preloading
daemon, they now are very different: preloading_preinitializing_daemon
is for Tizen 2.x only and amd_session_agent is for Tizen 3.x only.

Hope this clarifies a bit.

-- 
Stéphane Desneux
Intel OTC - Vannes/FR
gpg:1CA35726/DFA9B0232EF80493AF2891FA24E3A2841CA35726

On 14/11/2014 16:14, Ilya Palachev wrote:
> Hi,
> 
> Will preloading_preinitializing_daemon be used in Tizen3.0?
> Are there any plans to optimize it?
> 
> Regards,
> Ilya
> 
> On 14.11.2014 02:56, Semun Lee wrote:
>> Hi,
>>
>> That usleep is for checking if the application is launched, and the
>> cmdline
>> of the launched application is changed well. It is executed in the
>> amd_agent
>> (Launchpad) not in the application process. After the agent confirm
>> that the
>> application is launched, it send result of the launch request to the
>> requester.
>> It doesn't affect the startup time of an application.
>>
>>> -----Original Message-----
>>> From: Dev [mailto:[email protected]] On Behalf Of Ilya
>>> Palachev
>>> Sent: Tuesday, November 11, 2014 2:15 AM
>>> To: [email protected]
>>> Cc: Andrew Senkevich
>>> Subject: [Dev] Current status of preloading_preinitializing_daemon in
>>> Tizen
>>>
>>> Hi all,
>>>
>>> What's the current status of preloading_preinitializing_daemon in Tizen?
>>> Are there any plans to enhance startup time of Tizen applications?
>>>
>>> In ./am_session_agent/agent.c there is a code that does a 50 ms delay,
>>> that can happen e. g. 4 times during the startup of Phone application.
>>> This time can be critical.
>>>
>>> _static_ void __send_result_to_caller(int clifd, int ret)
>>> {
>>>           char *cmdline;
>>>           int wait_count;
>>>           int cmdline_changed = 0;
>>>           int cmdline_exist = 0;
>>>           int r;
>>>
>>>           if (clifd == -1)
>>>                   return;
>>>
>>>           if (ret <= 1) {
>>>                   __real_send(clifd, ret);
>>>                   return;
>>>           }
>>>           /* check normally was launched?*/
>>>           wait_count = 1;
>>>           do {
>>>                   cmdline = __proc_get_cmdline_bypid(ret);
>>>                   if (cmdline == NULL) {
>>>                           _E("error founded when being launched with
>>> %d",
>>> ret);
>>>
>>>                   } else if (strcmp(cmdline, agent_cmdline)) {
>>>                           free(cmdline);
>>>                           cmdline_changed = 1;
>>>                           break;
>>>                   } else {
>>>                           cmdline_exist = 1;
>>>                           free(cmdline);
>>>                   }
>>>
>>>                   _D("-- now wait to change cmdline --");
>>>                   usleep(50 * 1000);      /* 50ms sleep*/
>>>                   wait_count++;
>>>           } while (wait_count <= 20);     /* max 50*20ms will be sleep*/
>>>
>>>           if ((!cmdline_exist) && (!cmdline_changed)) {
>>>                   __real_send(clifd, -1); /* abnormally launched*/
>>>                   return;
>>>           }
>>>
>>>           if (!cmdline_changed)
>>>                   _E("process launched, but cmdline not changed");
>>>
>>>           _D("send_result_to_caller: %d",ret);
>>>
>>>           if(__real_send(clifd, ret) < 0) {
>>>                   r = kill(ret, SIGKILL);
>>>                   if (r == -1)
>>>                           _E("send SIGKILL: %s", strerror(errno));
>>>           }
>>>
>>>           return;
>>> }
>>>
>>> Regards,
>>> Ilya
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> https://lists.tizen.org/listinfo/dev
>>
> _______________________________________________
> Dev mailing list
> [email protected]
> https://lists.tizen.org/listinfo/dev
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to