开发者

Is their a performance penalty on IOS from importing (unnecessary) headers?

I have a fair number of categories I use on standard objective-c classes (NSString, NSArray, NSDate, etc. etc.). I traditionally have only imported the headers for these categories in classes that actually use them. It'd be much easier for me to simply include them all in the prefix header and never have to worry again about importing them individually. But I wondering if there is any sort of performance h开发者_运维问答it from doing so? I'm not really concerned if it takes longer to compile, only if it impacts performance of the actual app.


It might compile/link a bit longer but the application will run the same. Although it is not advisable from readability/maintainability point of view.


There shouldn't be a performance hit here, headers are only declarative and won't create anything that occupies memory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜