Open Bug 971301 Opened 6 years ago Updated Last year

Investigate console logging expenses

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

People

(Reporter: rnewman, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: perf)

Nick and I have a sneaking suspicion that calls to Log.* and isLoggable are having an impact on our overall perf. It is, after all, I/O -- and a lot of it. And a lot of string concatenation, allocation, and GC, too.

We should:

* Measure
* Switch to Logger (which is more efficient) or remove log statements
* Consider the use of selective preprocessing or Proguarding to eliminate the argument-compilation costs of disabled logging.


Furthermore, I think that initializing for a console.log statement in browser.js is causing ConsoleAPI.init to have a measurable impact on our startup profile. This is called from

  HealthReportStatusListener.init() @ browser.js:5529
  pbu_privacyContextFromWindow() @ PrivateBrowsingUtils.jsm:23
  AppUtils.jsm (via Webapps*)

We should strip out unnecessary logging from browser.js and its dependent modules so that we can delay initialization of the console API.
You need to log in before you can comment on or make changes to this bug.