I’m profiling an app that has a boat load of functions in many files and I’m trying to isolate functions that don’t get called ever.
Any ideas before I proceed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe there is an easy way to do this.
print_r(get_defined_functions());in a file that can be included at the end of every file or in a global. Collect the output and do searches on all your files for function calls. This will isolate out your functions.Or
Move all the functions to an include file, comment out the functions and then allow the application to error. As you get errors for those functions un-comment the functions to resolve the errors. At the end of all your checks you’ll have a list of commented functions that aren’t utilized.
Either way it’s not easy.