I just noticed something surprising with our nativescript-angular app, that we’re about the go into open beta with.
We couldn’t understand why it performed horrible even on my Sony XPeria Z3, until I tried to once again profile it.
It looks like console.log is either very CPU extensive or blocks the main threat, at least on Android.
A page switch to a simple page would according the profiler spend 2½-3s on console.log and about ½s on everything else, and the navigation transition looked sluggish.
Once I disabled all the console.log statements, it became much smoother and the page switch took little over ½s including the animation time.
My question is, can/should console.log() really cost that much?
I probably should note that there where (only?) about 20 log statements from the various components and services used by the page.