Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Firstly I'd echo the use of <code>NSOperation</code> and <code>NSOperationQueue</code>. You could fall-back to using <code>NSThread</code> directly, but the point of <code>NSOperation</code> is that it hides threading from you, leaving you to concentrate on the processing you need to do. Try firing <code>NSOperation</code> requests as and when required, see what the performance is like in your use-case; even if these operations get data in an async manner, it should provide you with a cleaner solution with good performance, plus future proof.</p> <p>I've successfully used <a href="http://developer.apple.com/iphone/library/documentation/General/Conceptual/ConcurrencyProgrammingGuide/OperationObjects/OperationObjects.html#//apple_ref/doc/uid/TP40008091-CH101-SW6" rel="noreferrer">NSInvocationOperation</a> to fire requests as often as required, and it sounds like the sort-of requirements and behaviour you're after. I would suggest more generally that you experiment with these in a test project; here you can test performance.</p> <p>The following weblog's helped me start playing with <code>NSOperation</code>:</p> <p><a href="http://www.dribin.org/dave/blog/archives/2009/09/13/snowy_concurrent_operations/" rel="noreferrer">http://www.dribin.org/dave/blog/archives/2009/09/13/snowy_concurrent_operations/</a></p> <p><a href="http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/" rel="noreferrer">http://www.cimgf.com/2008/02/16/cocoa-tutorial-nsoperation-and-nsoperationqueue/</a></p> <p>As always, the Apple <a href="http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html" rel="noreferrer">Threading Programming Guide</a> is a key read, to figure out which way to go depending on needs.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload