On Wed, Aug 27, 2014 at 12:14 PM, Eric Rahm <[email protected]> wrote:
> * console.log is a more standard solution but is "slow":
> I'm not sure how much this matters, it depends what slow means. Does
> it take a while for the log to show up, does it cost a lot of CPU
> (even when not being viewed), does it actually have a lot of overhead
> for the calling application?
I don't understand why one logging function would need to be slower
than another logging function. I.e. why would
console.log("displaying frobber");
need to be any slower than
newFangledLog("displaying frobber");
or
dump("displaying frobber");
The fact that console.log is slow right now is probably due to how we
have implemented it, not due to the way the API is designed. It seems
preferable to me to change the implementation of console.log rather
than write a new implementation of a new logging function.
The only reason I could see why console.log is slower is if there's so
many existing callsites of console.log that if we make it actually log
the way we want to log, that we'd end up logging so much information
that that would be a problem. But it doesn't sound like that is the
concern that people have with console.log.
So, in short, I think we should look at making console.log faster
rather than introducing a new API.
/ Jonas
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g