NSURLConnection performance on iPhone
NSURLConnection performance on iPhone
- Subject: NSURLConnection performance on iPhone
- From: Ben Lachman <email@hidden>
- Date: Sun, 02 Aug 2009 01:50:25 -0400
Hi All:
I'm working on a small iPhone project this weekend that among other
things downloads some medium sized video files. To do this I set up a
NSURLConnection and use an NSOutputStream to write the data to my
apps' documents folder as it arrives. The only problem is that I'm
seeing lousy download speed, particularly over wifi (~200K/sec over
3G, <100K/sec over wifi). Any ideas as to why this might be or if
there is anything I can do to improve things? Currently in
connection:didReceiveData: I append the incoming data to a temporary
buffer (mutable data obj) and then every ~1MB I write it out to disk
using my output stream. I do this because writing the stream to disk
every time I received data was even slower.
Thanks for any thoughts,
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
email: email@hidden
twitter: @benlachman
mobile: 740.590.0009
_______________________________________________
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