Closed
Bug 843771
Opened 13 years ago
Closed 11 years ago
[email] Disable logging for email
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: gwagner, Unassigned)
Details
We have seen in the past that console logging can be very expensive.
Let's disable it and create the logging strings based on a debug flag.
Comment 1•13 years ago
|
||
Our logging is actually shunted directly to dump() whenever we have mozTCPSocket around. See console-hook.js. Does that have the same level of overhead?
Also, it's worth noting that our console.BLAH calls are our poor man's debugging mechanism. We have a rather extensive logging infrastructure in place that's accessible via the secret debug menu:
https://wiki.mozilla.org/Gaia/Email/SecretDebugMode
Said secret debug menu currently works but our device storage persistence is broken for some reason, which does not turn out great. (The bookmarklet means of triggering the UI work when running in Firefox, however.)
| Reporter | ||
Comment 2•13 years ago
|
||
Generating the strings has a high overhead. Even if you don't print it to the console. For contacts this was a 2x slowdown for example.
That's why you see all this |if (DEBUG) debug(...)| stuff in contacts, settings....
The dump()s go to logcat, which is expensive even if you're not dynamically building the message.
Comment 4•13 years ago
|
||
(In reply to Chris Jones [:cjones] [:warhammer] from comment #3)
> The dump()s go to logcat, which is expensive even if you're not dynamically
> building the message.
Right, logcat and stdout can be slow because of the sync I/O. I thought we had turned off the dump pref for non-engineer builds though?
In any event, we can just strip out the console.BLAH stuff from the back-end (stuff in apps/email/js/ext/). They were just band-aids that grew in popularity because 'adb logcat' was good enough for debugging for a while when we had a lot of dumb bugs. The fancy logging is much better for us. Whatever would have been hooked up to set the DEBUG flag can just turn on fancy logging instead and presumably be used to trigger a dump of that (or enable direct streaming to dump()).
For the front-end (stuff not in js/ext/) we're not really that chatty in terms of console.BLAH calls, but it likely would correlate with times we really don't want to hitch because of a synchronous I/O write, so that makes good sense.
Summary: Disable logging for email → [email] Disable logging for email
Comment 5•11 years ago
|
||
We've seen no evidence of meaningful slowdowns from our various logging strategies, whereas we've seen massive QA/debugging benefits, so this is WONTFIX until we get smoking gun performance data in the future.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•