worker thread iterating over array - SLOW
worker thread iterating over array - SLOW
- Subject: worker thread iterating over array - SLOW
- From: Peter Lübke <email@hidden>
- Date: Tue, 1 Feb 2011 00:13:18 +0100
Hi list,
I use a worker thread in my app that invokes the same method(s) on
all objects in an array sent from the main thread. The array may
contain thousands of objects.
The main thread communicates with the worker thread via distributed
objects.
Everything works fine except performance is too slow.
Seems to me that my NSConnection asks for the method signature each
time the method is invoked on an object in the array, thus adding
massive overhead.
The shared objects approach - call NSThread's -
detachNewThreadSelector:toTarget:withObject: with the array as
argument 3, have the secondary thread do the job and exit - is way
faster!
I just started using DO and probably missed more than one thing, so
any help is very much appreciated.
- Peter
_______________________________________________
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