PDA

View Full Version : Does have NSLog in my code affect performance on actual device?




fenrus110
Aug 20, 2008, 12:00 PM
Hope this isn't a stupid question, but does having a lot of NSLog in my code affect the performance when I run it on the actual device?



sgauravv
Aug 20, 2008, 12:45 PM
I think yes because one instruction will need for every NSlog.
So i think u can use in this way then it will not effect so much
#ifdef _DEBUG
NSLog(string);
#endif.
so for debugging purpose u can define it for release purpose u can use not define