• 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: Best way to pass large objects between tasks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to pass large objects between tasks?


  • Subject: Re: Best way to pass large objects between tasks?
  • From: Oleg Krupnov <email@hidden>
  • Date: Mon, 13 Apr 2009 09:26:18 +0300

Thanks Graham.

I haven't tried either of the methods I mentioned so far (because I'm
lazy, sorry:), but what I have tried is I created NSData from the
large object by using NSKeyedArchiver. It has taken forever, so that I
had to force-quit the process. That's why I am asking if the same
thing is going to happen with piples and DO? Or maybe I'm doing
something wrong?

By "large" I mean about 10-100 MB. I don't think I am going to hit the
boundary of VM anyway.

Any ideas?


On Mon, Apr 13, 2009 at 9:18 AM, Graham Cox <email@hidden> wrote:
>
> On 13/04/2009, at 4:09 PM, Oleg Krupnov wrote:
>
>> I need to pass objects from one task (child) to another (parent) on
>> the same machine.
>>
>> Currently I am considering two alternatives: Pipes vs Distributed
>> Objects, and my main concern is performance, because the object is
>> really large.
>
> How large is "really large"?
>
> 10MB, 1GB, 500GB?
>
>> 1) Are DO going to be faster?
>
> Why don't you measure and see?
>
> Basically, if the processes are on the same machine, passing the object is a
> memory-to-memory copy (notwithstanding VM), so it's going to be *extremely*
> fast. If the object is large the data content will completely dominate the
> "wrapping" used to transport it, so I'll bet any method is as good as any
> other. If the object is so large that VM is going to constrain you in any
> meaningful way, you could always write it to disk then map that file into
> the second process. Avoiding copying the data at all is surely your best bet
> once you exceed a certain size threshold, but I'd bet that the threshold is
> *huge*, so it comes down to what you mean by "really large".
>
> --Graham
>
>
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Best way to pass large objects between tasks?
      • From: Marcel Weiher <email@hidden>
    • Re: Best way to pass large objects between tasks?
      • From: Yoshiaki Katayanagi <email@hidden>
    • Re: Best way to pass large objects between tasks?
      • From: Graham Cox <email@hidden>
References: 
 >Best way to pass large objects between tasks? (From: Oleg Krupnov <email@hidden>)
 >Re: Best way to pass large objects between tasks? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Display NSTextView as Label - without InterfaceBuilder
  • Next by Date: Re: Best way to pass large objects between tasks?
  • Previous by thread: Re: Best way to pass large objects between tasks?
  • Next by thread: Re: Best way to pass large objects between tasks?
  • Index(es):
    • Date
    • Thread