O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

For the More Curious: Faster Scattered

The goal in this chapter was to make Scattered a better-behaved application by moving heavy lifting off the main thread. You did not, however, fully address the performance issues with this application. If you were watching closely, you may have noticed that you limited the number of concurrent operations in processingQueue to four. If you remove that constraint (by commenting out the line), you may find that Scattered runs somewhat faster, or you may find that it runs even slower. What is going on here?

One of the most useful features of Grand Central Dispatch (GCD), which NSOperationQueue is built upon, is that GCD manages the number of running operations (threads) based on the system’s hardware ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required