• 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: Does CFSocket use efficient polling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does CFSocket use efficient polling?


  • Subject: Re: Does CFSocket use efficient polling?
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 13 Feb 2009 16:28:56 -0800


On Feb 13, 2009, at 3:59 PM, Ladd Van Tol wrote:

1) Using NSURLConnection to download data, appending to NSMutableData in the delegate's connection:didReceiveData:. Caching is turned off.
2) Using libcurl's easy interface in a thread spawned for each connection, notifying back to the main thread on completion (with performSelectorOnMainThread). Curl does not appear to do any content caching.

Did you sample test #1 to see where the time is spent? Repeated appends to an NSMutableData will do a lot of memcpy's as it grows its buffer, with performance roughly O(n^2). It sounds like test #2 isn't storing the data at all, so this isn't a fair comparison.


Also, the data rates you're getting (with your local server) exceed even gigabit Ethernet capacity. In the real world, very few people are going to complain when NSURLConnection limits them to 'only' 2000mbps :)

—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Does CFSocket use efficient polling?
      • From: Ladd Van Tol <email@hidden>
    • Re: Does CFSocket use efficient polling?
      • From: Mark Pauley <email@hidden>
References: 
 >Re: Does CFSocket use efficient polling? (From: Scott Ribe <email@hidden>)
 >Re: Does CFSocket use efficient polling? (From: Josh Graessley <email@hidden>)
 >Re: Does CFSocket use efficient polling? (From: Ladd Van Tol <email@hidden>)

  • Prev by Date: Re: Does CFSocket use efficient polling?
  • Next by Date: Re: Does CFSocket use efficient polling?
  • Previous by thread: Re: Does CFSocket use efficient polling?
  • Next by thread: Re: Does CFSocket use efficient polling?
  • Index(es):
    • Date
    • Thread