[Dev] First measurement of the SAPI overhead

Patrick Ohly patrick.ohly at intel.com
Wed Jul 2 07:08:45 GMT 2014


On Wed, 2014-07-02 at 10:31 +0900, Carsten Haitzler wrote:
> 
> On 07/02/2014 08:58 AM, Dominig ar Foll (Intel OTC) wrote:
> 
> > Le 02/07/2014 01:01, Carsten Haitzler (The Rasterman) a écrit :
> > 
> > > O
> > > 
> > > 2. what's the call overhead without socket (cost of a function call)... :) that
> > > is what you are comparing against.
> > > 
> > > the best case scenario here - 0.1ms ... give a BEST case of 10,000 calls per
> > > second.. assuming the ONLY thing i do is that and nothing else... that's pretty
> > > low. but then again you need some level of real-life data
> > Remember that we are only taking about the signaling API and not the
> > transfer API.
> > So having 10000 of call  per second is not a realistic concern.
> 
> i thought this was meant to be an ipc round trip per "api"?

Indeed. So let's look at the mail API:

https://review.tizen.org/gerrit/gitweb?p=platform/core/api/email.git;a=blob;f=include/email.h;h=61676806748c7ed44ee4505e0c71588832ec82c4;hb=refs/heads/tizen

There's email_create_message() giving us a local pointer. Then there's
email_set_subject(), taking such a pointer. This is a specific example
of the problem that I mentioned in my other email, where the proxy needs
to validate the pointer before calling the original CAPI
email_set_subject().

It's also an example for "local function call becomes
RPC" (https://review.tizen.org/gerrit/gitweb?p=platform/core/api/email.git;a=blob;f=src/email.c;h=a6d447602a965ef25e610f13edc63a52c11bf4be;hb=refs/heads/tizen).

One can argue that this function will only be called rarely. But is that
the case for all functions?

And is this really the right API to look at in the first place? See
below.

> > I invite you to look at the current CAPI which are the candidate for
> > wrapping, you will find an updated list here :
> > 
> >    https://wiki.tizen.org/wiki/User:Sdi2 

These are the services. Do you have the corresponding list of APIs which
are meant to be wrapped?

For email, there's the capi referenced above (pretty limited, only
supports composing and sending an email) and the underlying
email-service API
(https://review.tizen.org/gerrit/gitweb?p=platform/core/messaging/email-service.git;a=tree;f=email-api/include;h=cbe9692e989ae1b5abbfa5bb065048f4bbc81306;hb=refs/heads/tizen).

It was said that Crosswalk should rely on SAPI to implement the web
APIs. For email, the capi is not sufficient for implementing the Tizen
messaging API
(https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.device.apireference/tizen/messaging.html).

> email and messaging, from memory allow you to fetch messages/emails.
> that means you have data to fetch... ?

The capi for email doesn't allow fetching, the email-service does. So we
need to clarify first which one is supposed to be wrapped.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





More information about the Dev mailing list