On Thu, May 14, 2009 at 6:42 PM, Luke the Hiesterman <[email protected]> wrote: > To add to that thought, I should add that even if there is a performance > difference, I'd be surprised if it's anything that anyone would notice. It's > generally a mistake to assume there's a performance problem with a certain > approach until you've actually seen the performance problem. In cases like > this, I would say that what makes sense to the programmer, and what makes > the most simple code should trump what's fastest unless someone can show a > tangible gain in one way over the other.
Certainly the overhead is highly unlikely to matter for this situation. It could become significant if you're loading many hundreds of images simultaneously, and the problem will transition from "overhead" to "bug" as you pass about 2600 simultaneous loads due to the inherent per-process thread limit in OS X. (If you wanted to avoid the problem for such an unreasonable number of simultaneous loads, NSOperationQueue is probably the way to go.) I agree completely that the simplest code should win, but I also think that the thread adds complexity, not just overhead. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
