Closed Bug 1374665 Opened 8 years ago Closed 8 years ago

Sending permissions for service workers during content process initialization can be very slow

Categories

(Core :: Permission Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Performance Impact high
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 + fixed
firefox56 + fixed

People

(Reporter: mconley, Assigned: nika)

References

Details

(Keywords: perf, regression)

Attachments

(2 files, 1 obsolete file)

I just noticed some jank in my browser and captured this profile: http://bit.ly/2swvv8V We're spending about 300ms sending permissions for service workers down to the content process here. We should probably do less of that. I sent the list of service workers I have registered to mystor for reference.
Assignee: nobody → michael
Whiteboard: [qf]
This should change the logic to completely avoid parsing any principals during the hot codepath. MozReview-Commit-ID: 28BCIqA2Kf2
Attachment #8879732 - Flags: review?(ehsan)
Attachment #8879732 - Flags: review?(ehsan) → review+
This needs to be backported to 55, I think. The profile in comment 0 is from 27 service workers.
Did some minor fixups due to try failures :) MozReview-Commit-ID: 28BCIqA2Kf2
Attachment #8879732 - Attachment is obsolete: true
Pushed by michael@thelayzells.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/44532a19e524 Stop parsing principals during GetPermissionsForKey, r=ehsan
The patch cherry-picked cleanly on beta, but I'm re-attaching it anyway :) MozReview-Commit-ID: 28BCIqA2Kf2
I had to back this out because it or something else from the push caused bug 1375293, which was failing more frequently than we could handle. remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cbeb4bc60daa798c60102102c15e51a5af94265a
Flags: needinfo?(michael)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Backout by philringnalda@gmail.com: https://hg.mozilla.org/mozilla-central/rev/62899ab59159 Backed out changeset 44532a19e524 for test_group_mouseevents.html failures a=backout
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: mozilla56 → ---
Pushed by michael@thelayzells.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/13422d457a38 Stop parsing principals during GetPermissionsForKey, r=ehsan
Whiteboard: [qf] → [qf:p1]
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Comment on attachment 8880143 [details] [diff] [review] BETA - Stop parsing principals during GetPermissionsForKey Approval Request Comment [Feature/Bug causing the regression]: bug 1353179 [User impact if declined]: Starting new content processes will be slower if you have a decent number of Service Workers. [Is this code covered by automated tests?]: Not explicitly, but exercised heavily. [Has the fix been verified in Nightly?]: Just landed [Needs manual test from QE? If yes, steps to reproduce]: No [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: Not really [Why is the change risky/not risky?]: Small risk comes from changing the way that we handle principals in the permission manager slightly. The permission manager is already quite conservative with its use of complex principals, so I don't think it is likely to have been super broken. [String changes made/needed]: None
Flags: needinfo?(michael)
Attachment #8880143 - Flags: approval-mozilla-beta?
Depends on: 1315092
Comment on attachment 8880143 [details] [diff] [review] BETA - Stop parsing principals during GetPermissionsForKey Should improve perf for service worker heavy pages - let's take this for beta 5.
Attachment #8880143 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Depends on: 1442784
No longer depends on: 1442784
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: