Closed Bug 1171173 Opened 9 years ago Closed 9 years ago

After start, Disabling/Enabling uBlock considerably lowers page load times with E10s


(Firefox :: Untriaged, defect)

Not set



Firefox 42
Tracking Status
e10s m8+ ---
firefox41 --- fixed
firefox42 --- fixed


(Reporter: tenisthenewnine, Assigned: billm)


(Blocks 1 open bug)


(Keywords: perf, regression)


(1 file)

As reported here:

   1. With Nightly 41's profile manager ("firefox -p"), create a new profile, install uBlock.
   2. Disable E10s, restart browser. Load "" and measure "" a few times. Note page load times.
   3. Enable E10s, restart browser. Redo the test a few times. Note that load times have gone up measurably.
   4. Open Firefox' Add-ons-Manager, disable and immediately re-enable uBlock. Redo tests. Page load times are now lower again, about on non-E10s level, but only until next browser restart, after which another disable/enable-sequence is needed to bring load times down again.

The addon developers commented on it and said:

"I am still investigating. It has something to do with browser launch only, issue disappears if manually enabling the addon after startup, or if disabling/enabling like you found out. All is the same code in both case, so I suspect there is some quirks with e10s API at launch time.

Edit: For example, if I disable uBlock, quit Nightly, launch Nightly and click as fast as possible to enable uBlock, all is fine. It's as if if uBlock is enabled, Nightly will do something bad to uBlock at launch."

To summarize, repro steps:

Nightly 41.0a1
Linux Mint 17

1. Install uBlock in Nightly (e10s enabled)
2. Quit Nightly
3. Launch Nightly
4. Open browser console
5. Load a web page, say ``
6. great amount of warnings: "Sending message that cannot be cloned. Are you trying to send an XPCOM object?"
7. This happens systematically at every launch

With the following steps, this does not happen:

1. Install uBlock in Nightly (e10s enabled)
2. Disable uBlock
3. Quit Nightly
4. Launch Nightly
5. Open browser console
6. Load a web page, say ``
7. No "Sending message that cannot be cloned. Are you trying to send an XPCOM object?" warning

For the pathological case, when I trace into the code, I see that that for some reasons the standard objects in the sandbox are not in a proper state:

1. Date object doesn't have a now() static method.
2. Math object doesn't have a random() static method.
3. String object does not have a charFromCode() static method.
4. And so on.

Just disabling/enabling uBlock solves this, or launching Nightly with uBlock disable and enabling after launch.
Correction with second set of steps: I forgot a step:

4a: Enable uBlock
tracking-e10s: --- → ?
Ever confirmed: true
Keywords: perf
Regression window of the slowness

Via local build
Last Good: 6a160892b400
First Bad: 5bfcda09ea13
Triggered by: 	5bfcda09ea13	Bill McCloskey — Bug 1099416 - [e10s] Make sure add-on shims are always enabled (r=ally)
Flags: needinfo?(wmccloskey)
Any news on this one?
( FYI, The "Sending message..." wa added by Bug 1139718 )
Bug 1156065 fixed some of the "Sending message that cannot be cloned. Are you trying to send an XPCOM object?" message spam.  The fix in that bug may provide some clues for fixing this one.
Attached patch patchSplinter Review
It looks like the multiprocessCompatible flag is pretty severely broken. I think I made a mistake in rebasing when I landed it.

Anyway, the fix is pretty simple. We just need to pass it through createAddonDetails. I tried to write a test for this and I can't figure out how to do it. The problem seems to present only if the add-on was already installed when Firefox started up. I'm guessing there's a way to simulate that but I don't know how.

Felipe, if you're not the right person to review this, can you find someone? Mossop is on a three week vacation and Unfocused is marked as UNAVAILABLE in bugzilla. Irving apparently no longer works on Firefox.

One option would be to land the fix soon and then wait for Mossop to review the test when he gets back.
Assignee: nobody → wmccloskey
Flags: needinfo?(wmccloskey)
Attachment #8629156 - Flags: review?(felipc)
Comment on attachment 8629156 [details] [diff] [review]

Review of attachment 8629156 [details] [diff] [review]:

I think I'm fine with my review here, you can land it all now. Dave can take a look at the test later if he wants but I doubt he'd oppose landing this now.
Attachment #8629156 - Flags: review?(felipc) → review+
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Comment on attachment 8629156 [details] [diff] [review]

This would be nice to have or Aurora users. It fixes some e10s addon problems.

Approval Request Comment
[Feature/regressing bug #]: none
[User impact if declined]: broken add-ons (uBlock in particular)
[Describe test coverage new/current, TreeHerder]: been on m-c for a while
[Risks and why]: pretty low; won't have any effect once we go to beta.
[String/UUID change made/needed]: none
Attachment #8629156 - Flags: approval-mozilla-aurora?
Comment on attachment 8629156 [details] [diff] [review]

Approving as this has been on m-c for a few days so seems stable for uplift to Aurora.
Attachment #8629156 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.