Posts Tagged efficiency

SSD versus HDD, Movie Frame Grabs and the importance of profiling

There was an e-mail to Apple’s cocoa-dev e-mail list that provoked a bit of discussion. The discussion thread starts with this e-mail to cocoa dev by Trygve.

Basically Trygve was wanting to get better performance from his code for taking frame grabs from movies and drawing those frame grabs as thumbnails to what I call a cover sheet. Trygve was using NSImage to do the drawing and was complaining that based on profiling his code was spending 90% of the time in a method called drawInRect.

Read the rest of this entry »

Tags: , , , , , , , ,

Modules as a replacement for Pre-Compiled Headers

Using Xcode 5 and the 10.9 SDK or the iOS 7 SDK you can take advantage of the new compiler feature Modules.

The current #include/#import model for including Framework headers is both  inefficient and fragile. Fragile because if you #define a macro before including/importing a header file that macro can modify the interpretation of the Framework headers and if that macro is defined in some source files and not others the interpretation of the Framework header files will be different depending on source files including the framework.

Read the rest of this entry »

Tags: , , , ,