Introducing Affirmative | Rickard Andersson

Introducing Affirmative

As I mentioned a few posts back, I’m keen on getting into Mac development. At first, I was just intrigued with the concept of Grand Central Dispatch, but now I’m just generally into it. I needed a “Hello World” application to get me started, so I figured I would do an application that verifies SFV files. There are other apps for the Mac that do this, but what the hell, choice is good, right?

So, without further ado, I present to you Affirmative!

When I started the project, I figured CRC32 calculations were a perfect fit for Grand Central Dispatch. I toyed with the idea of using GCD, but it turns out that doing CRC32 calculations is I/O bound, not CPU bound. That is, the bottleneck is the hard drive, not the CPU. Spawning multiple threads to calculate the CRC32 checksum using GCD actually worsened performance as all the threads were waiting on the hard drive instead of crunching numbers. With this information in hand, I decided to stay away from GCD for this project and do a relatively common two-thread application instead.

Stay tuned for more apps. I actually have a pretty good idea of what I’m gonna do next.

Post a Comment

Comments are moderated. Your email is never published nor shared.