What's the overhead of unneeded #import directives?

import, llvm, objective-c

Solution

Assuming in your header file is only what is supposed to be in header files, which are type definitions, class interfaces, protocols, macros etc. then it just blows up the compile time and some memory consumption during compile time. You can trust compiler and linker so far that the app should not be influenced at all.

I am just not certain whether it does blow up symbol tables in debug mode. But even that should have no impact on release builds at all.

Problem

What's the downside to putting lots of stuff in your pch file? If you have a lot of "utility" type classes is there a downside to putting them in your pch file so that they're available everywhere? Does this bloat the size of your compiled app or just slow down compilation?

Original source