views:

126

answers:

0

I am writing an app that caches streaming content from the web on the iPhone. Right now, I'm saving data to disk as it arrives (in chunk sizes ranging from 1KB to about 60KB), but application response is somewhat sluggish (better than I was expecting, but still pretty bad).

My question is: does anyone have a rule of thumb for how frequent and large writes to the device memory should be to maximize performance?

I realize this seems application-specific, and I intend to do performance tuning for my scenario, but this applies generally to any app on the iPhone downloading a lot of data because there is probably a sweet spot (given sufficient incoming data availability) for write frequency/size.

These are the resources I've already read related to the issue, but no one addresses the specific issue of how much data to accumulate before dumping:

Best way to download large files from web to iPhone for writing to disk
The Joy in Discovering You are an Idiot