Investigate console logging expenses

NEW
Unassigned

Status

()

Firefox for Android
General
4 years ago
4 years ago

People

(Reporter: rnewman, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug, {perf})

Trunk
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
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.