• 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: NSURLConnection vs. NSThread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection vs. NSThread


  • Subject: Re: NSURLConnection vs. NSThread
  • From: Michael Ash <email@hidden>
  • Date: Thu, 14 May 2009 20:35:36 -0400

On Thu, May 14, 2009 at 6:42 PM, Luke the Hiesterman <email@hidden> 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@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: NSURLConnection vs. NSThread
      • From: Luke the Hiesterman <email@hidden>
References: 
 >NSURLConnection vs. NSThread (From: "Eric E. Dolecki" <email@hidden>)
 >Re: NSURLConnection vs. NSThread (From: Mike Abdullah <email@hidden>)
 >Re: NSURLConnection vs. NSThread (From: Luke the Hiesterman <email@hidden>)
 >Re: NSURLConnection vs. NSThread (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: NSURLConnection vs. NSThread
  • Next by Date: Re: Interpreting -underlinePosition and -underlineThickness
  • Previous by thread: Re: NSURLConnection vs. NSThread
  • Next by thread: Re: NSURLConnection vs. NSThread
  • Index(es):
    • Date
    • Thread