I am developing a JavaScript game and then I would like to "phonegap" it to the mobile platform, specifically Android. It is a well known fact that these non-native apps could be really power consuming when run on mobile, so I would like to optimize it the best.
Is there a way to determine which part of the code, or which function is the most power consumptive? Some sort of a JS debugger, which would tell me how much time it took to run that part of the code - or which would tell me which part I should rewrite?
Optimization is a tricky process and I know it, but I wanted to give this a shot.
Thanks in advance.