tpinit
and tptern
tuxedo function taking time. Its basically used in every request by client to join and leave the application. we observed heavy slowness when number of request is higher from a multi-threaded client process.
We try to increase the virtual core in machine but still face the same problem.
TPINIT * tpinitbuf;
if((tpinitbuf = (TPINIT *)tpalloc("TPINIT",(char *)NULL,TPINITNEED(16))) == (TPINIT *)NULL)
{
printf("ERROR IS:: %s\n", tpstrerror(tperrno));
return NULL;
}
tpinitbuf->flags = TPMULTICONTEXTS;
tpinit(tpinitbuf); //this function is taking time.
tpgetctxt(&ctxt, 0);
tpfree ((char *) tpinitbuf) ;
retVal=tpcall("MY_SERVICE",(char *)buf1,0,(char **) &buf2,&size,0L);
tpterm(); // this function is taking time.
Ideally tpinit
, tpterm
should take around 50 milliseconds, but when number of request is high its takes around 1.3 sec.