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 <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com