console-extras.js icon indicating copy to clipboard operation
console-extras.js copied to clipboard

console.__getCallID is too slow

Open karacas opened this issue 11 years ago • 0 comments

I used this lib to degug three.js project, works nice!, but i realized that getCallID make a FPSs drops significantly. I solve temporarily this adding a manual id argument, in this way: (surely there is a better way)

console.times = function (n, id) { var ret = Object.create(limited); ret.__id = this.__id || id || console.__getCallID(1); ret.__limit = n; ret.__throttle = this.__throttle || 0; return ret; }; console.times.consoleExtras = true; console.throttle = function (time, id) { var ret = Object.create(limited); ret.__id = this.__id || id || console.__getCallID(1); ret.__limit = this.__limit || Infinity; ret.__throttle = time; return ret; }; console.throttle.consoleExtras = true;

karacas avatar Mar 13 '13 17:03 karacas