Keeping waste file or functions in code increases memory consumption?. Will it impact on application or its performance?
Like for eg: i will keep some functions in my code but i wont call it or use it any were. If that is the case will it impact on app?
That depends on what exactly you mean by “memory”
Leaving those extra functions in will not cause your app to use more of the devices RAM while it is running. So no it shouldn’t affect your performance at all.
Leaving the functions in will cause the final size of your APK to be bigger (I think, but have not tested. It is possible that maybe the compiler is smart enough to ignore them if they aren’t called.). But unless we are talking about some seriously mammoth sized functions the increase in size should be negligible. With phones now adays having fairly large internal storage spaces, and users having the option to move apps to the SD card I would say it shouldn’t really be very high on your list of concerns. If you are deadset on optimizing every last ounce out of your app though removing them will reduce your size some.
Unused drawable assets (i.e. png files) would be much higher on the list of concerns though, one extra png file would ammount to the same space as A LOT of text in compiled class files.