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