worker thread iterating over array - SLOW
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Hi list, - Peter _______________________________________________ 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/site_archiver%40lists.apple... 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Peter Lübke