Closed
Bug 1154323
Opened 10 years ago
Closed 10 years ago
Instrument browser.js for profiling
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox40 fixed, fennecNightly+)
RESOLVED
FIXED
Firefox 40
People
(Reporter: snorp, Assigned: snorp)
Details
(Keywords: feature)
Attachments
(1 file, 1 obsolete file)
|
2.53 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
It would be nice to have profiling markers when we start and stop loading pages (according to nsIWebProgressListener) and maybe also mark when browser.js init starts/stops
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8592271 -
Flags: review?(margaret.leibovic)
Comment 2•10 years ago
|
||
Comment on attachment 8592271 [details] [diff] [review]
Add profiler markers when we start/stop loading a page on Android
Drive by
> // Filter optimization: Only really send NETWORK state changes to Java listener
> if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
I wonder if we should wrap this in a Nightly check using AppContstants
>+ if ((aStateFlags & Ci.nsIWebProgressListener.STATE_START) &&
>+ aWebProgress.isTopLevel) {
No wrap needed
>+ Profiler.AddMarker("Load start: " + aRequest.QueryInterface(Components.interfaces.nsIChannel).originalURI.spec);
Components.interfaces.nsIChannel -> Ci.nsIChannel
>+ } else if ((aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) &&
>+ !aWebProgress.isLoadingDocument) {
No wrap needed
>+ Profiler.AddMarker("Load stop: " + aRequest.QueryInterface(Components.interfaces.nsIChannel).originalURI.spec);
Components.interfaces.nsIChannel -> Ci.nsIChannel
Comment 3•10 years ago
|
||
Comment on attachment 8592271 [details] [diff] [review]
Add profiler markers when we start/stop loading a page on Android
Review of attachment 8592271 [details] [diff] [review]:
-----------------------------------------------------------------
I agree with mfinkle's comments. I agree it would probably be good to put this behind a Nightly only check.
f+ for now and I'll re-review with comments addressed.
::: mobile/android/chrome/content/browser.js
@@ +4406,5 @@
>
> // Filter optimization: Only really send NETWORK state changes to Java listener
> if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) {
> + if ((aStateFlags & Ci.nsIWebProgressListener.STATE_START) &&
> + aWebProgress.isTopLevel) {
I don't think we need this isTopLevel check, since we bail early if this isn't the top level window.
Attachment #8592271 -
Flags: review?(margaret.leibovic) → feedback+
Updated•10 years ago
|
Assignee: nobody → snorp
| Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8592271 -
Attachment is obsolete: true
Attachment #8595367 -
Flags: review?(margaret.leibovic)
Comment 5•10 years ago
|
||
Comment on attachment 8595367 [details] [diff] [review]
Add profiler markers when we start/stop loading a page on Android
Review of attachment 8595367 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/chrome/content/browser.js
@@ +4411,5 @@
> + if (AppConstants.NIGHTLY_BUILD && (aStateFlags & Ci.nsIWebProgressListener.STATE_START)) {
> + Profiler.AddMarker("Load start: " + aRequest.QueryInterface(Ci.nsIChannel).originalURI.spec);
> + } else if (AppConstants.NIGHTLY_BUILD && (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) && !aWebProgress.isLoadingDocument) {
> + Profiler.AddMarker("Load stop: " + aRequest.QueryInterface(Ci.nsIChannel).originalURI.spec);
> + }
Nit: To make this a bit easier to reader, you could just put this flags checking logic all inside a single |if (AppConstants.NIGHTLY_BUILD)| block (instead of checking that in 2 different if statements).
Attachment #8595367 -
Flags: review?(margaret.leibovic) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•