• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Message Forwarding Overhead / Performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message Forwarding Overhead / Performance


  • Subject: Re: Message Forwarding Overhead / Performance
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 29 Oct 2008 10:07:07 +0100


Le 29 oct. 08 à 04:46, Michael Ash a écrit :

On Tue, Oct 28, 2008 at 6:16 PM, Jerry Krinock <email@hidden> wrote:
Roughly, the lesson is: Don't use message forwarding for "actual work". I
was just wondering if anyone had ever found otherwise.

I have to say that this is greatly overstating things. I've used forwarding for all sorts of real work. What you don't want to do is put it into a situation where it needs to execute hundreds of thousands of times a second. But there are a lot of situations which qualify as "actual work" for which that does not apply.

20us is slow when compared to a normal message send. It's
instantaneous when compared to, say, writing a file to disk. Whether
it's "too slow" depends entirely on what you need.

Mike

And it is heavily used in Cocoa for Distributed object, undo manager, and probably more.


Anyway, it's premature optimization. If Shark tell you that forwardlyAdd forwarding: is a bottleneck, just override it in your parent class to forward the message manually:

-  (void)forwardlyAdd:(int)arg {
	[forwardee forwardlyAdd:arg];
}


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Message Forwarding Overhead / Performance (From: Jerry Krinock <email@hidden>)
 >Re: Message Forwarding Overhead / Performance (From: Bill Bumgarner <email@hidden>)
 >Re: Message Forwarding Overhead / Performance (From: Jerry Krinock <email@hidden>)
 >Re: Message Forwarding Overhead / Performance (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: file references in CoreData
  • Next by Date: Path handling routines
  • Previous by thread: Re: Message Forwarding Overhead / Performance
  • Next by thread: Re: Message Forwarding Overhead / Performance
  • Index(es):
    • Date
    • Thread