Re: DO optimisation questions
Re: DO optimisation questions
- Subject: Re: DO optimisation questions
- From: "Laurent Daudelin" <email@hidden>
- Date: Fri, 13 Feb 2004 12:26:15 -0500
On 13/02/04 12:03, "email@hidden" <email@hidden> wrote:
>
hi all !
>
>
i'm using DO to communicate between 2 process on remote mac. things are now
>
quite stable and i'm trying to optimize this app.
>
I've seen ObjC support DO optimization with clever keyword, but i find Apple
>
documentation quite poor on the subject !
>
As far as i understand, *EVERY* time a method return void and does not return
>
anything by reference or copy in passed arguments we should use 'oneway'
>
keyword to avoid waiting for a reply ?
>
>
another point i want to clear :
>
if i have a method like this (executed by the proxy) :
>
- (void)setString:(NSString*)aString; // i want the proxy to be set the
>
'content value' of the string, not a reference (or image of reference) to
>
aString
>
>
to "optimize it to the max", can i declare it like this in the protocol :
>
- (oneway void)setString:(in bycopy NSString*)aString;
>
>
oneway : because i dont need a return value
>
in : because i pass information
>
bycopy : because i prefer the remote process to have a copy of the string
>
(since it will read it frequently it should avoid the slowness of network)
>
is it the "best solution" for this purpose ?
>
>
last point i want to clarify :
>
using the keyword out and oneway in the same method is stupid or even
>
incompatible since we want a return value (using out to get back information)
>
but avoid the waiting for a return value with oneway ???
I haven't done DO in a while but you're basically right on all account. Any
method, for example, that is marked as "oneway", will return to the caller
as soon as the method is executed. Same for in, out, bycopy, etc. In theory,
that's how it is supposed to work. In practice, you sometimes have
surprises, though...
-Laurent.
--
========================================================================
Laurent Daudelin Developer, Multifamily, ESO, Fannie Mae
mailto:email@hidden Washington, DC, USA
************************ Usual disclaimers apply ***********************
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.