Monthly Archives: October 2007

Time Machine Exclusions

So Time Machine is a pretty convenient way to backup your machine, and I use it to backup my laptop to an external FireWire drive. Although Time Machine backs up the “whole system,” I assumed there had to be some exclusions, such as cache files or /dev, for example. After a short bit of digging, I discovered that these paths are specified in a standard property list at /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.plist The full list is some 57 items, and is available below. … Continue reading

Posted in Software | 40 Comments

Quicksilver Plugins

As the Quicksilver site seems to be down right as everyone is reinstalling for Leopard, I’ve packaged the plugins I have into a zip available here. Quicksilver itself is available here. To install, just put the PlugIns folder in your Library/Application Support/Quicksilver folder or double click the plugins. [Update] Zon Wakest was nice enough to upload additional plugins. Thanks Zon! These are now added into my archive and the combined list is below. If you got the old archive, download … Continue reading

Posted in General | 54 Comments

Pointless Optimization

The other day I needed to write a function to give me a formatted string representation of a quantity of bytes. Pretty trivial function, but nontheless, I found myself optimizing it. I ended up with the following: static uint64_t count = 7; static NSString *suffixes[7] = { @"B", @"KiB", @"MiB", @"GiB", @"TiB", @"PiB", @"EiB"}; uint64_t i, c; for (i = 1024, c = 0; i < (count << 60); i <<= 10, c++) { if (bytes < i) return [NSString … Continue reading

Posted in Software | Leave a comment

Color Setting Performance

If you’re looking to eek some extra performance out of your drawing code, take a look at how you’re setting your fill and stroke colors. Setting the color using CGContextSetRGBFillColor() or creating a new CGColorRef/NSColor object each time you set the color is quite expensive to do each time you draw. Depending on how many colors you use in your drawing, consider caching the CGColorRef objects and using CGContextSetFillColorWithColor() or -[NSColor setFill] instead. A CGColorRef is 48 bytes for a … Continue reading

Posted in Software | Leave a comment