Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is creating logs affect the system memory by any means?

We usually put logs to check if some code block executes or not. But we generally don't remove it before publishing the app.I don'y know about other but i have fond of that feature and using it fluently in my apps.Can any one tell me that what will be the effect on system memory of writing any of the Log.x() (where X=v,e,w,i,d) forms. Do anyone help me clear some concepts?

like image 872
kaushal trivedi Avatar asked Nov 22 '25 19:11

kaushal trivedi


1 Answers

Definitely there will be a lot of effect on Memory usage, APK file size and Performance.

Besides, You must remove all the Logs before publishing the app.

Of course, once you remove all the Logs and publish it, its pain to rewrite them.

Hence use Proguard which removes all the Logs from the ByteCode, but doesn't effect the source code.

Apart from removing Logs, Proguard helps in performance enhancement by Obfuscating you code, removing unused methods, variables etc.. All that depends on how you configure it.

Enabling ProGuard in Eclipse for Android

How to avoid reverse engineering of an APK file?

like image 99
Archie.bpgc Avatar answered Nov 24 '25 10:11

Archie.bpgc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!