Closed Bug 1361347 Opened 7 years ago Closed 1 year ago

Can refreshIdentityBlock be optimized?

Categories

(Firefox :: Site Identity, enhancement, P3)

enhancement

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: florian, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxperf:p3])

See https://perfht.ml/2pSTJLT for a profile of where we currently spend the time in it.
Priority: -- → P3
Here is a startup profile on a slow netbook, where we spend 34ms in refreshIdentityBlock: https://perfht.ml/2s1iTbR

I wonder if the code triggering this at http://searchfox.org/mozilla-central/rev/1a0d9545b9805f50a70de703a3c04fc0d22e3839/browser/base/content/browser.js#4383 is really needed? I wouldn't be surprised if we didn't have a page loaded yet at that point.
(In reply to Florian Quèze [:florian] [:flo] from comment #1)
> I wonder if the code triggering this at
> http://searchfox.org/mozilla-central/rev/
> 1a0d9545b9805f50a70de703a3c04fc0d22e3839/browser/base/content/browser.
> js#4383 is really needed? I wouldn't be surprised if we didn't have a page
> loaded yet at that point.

I think it's pretty much impossible to have page loaded there other than about:blank maybe.
(In reply to Dão Gottwald [::dao] from comment #2)
> (In reply to Florian Quèze [:florian] [:flo] from comment #1)
> > I wonder if the code triggering this at
> > http://searchfox.org/mozilla-central/rev/
> > 1a0d9545b9805f50a70de703a3c04fc0d22e3839/browser/base/content/browser.
> > js#4383 is really needed? I wouldn't be surprised if we didn't have a page
> > loaded yet at that point.
> 
> I think it's pretty much impossible to have page loaded there other than
> about:blank maybe.

Filed bug 1386594
Whiteboard: [fxperf]
Whiteboard: [fxperf] → [fxperf:p3]
Severity: normal → S3

Given that we've removed the startup path in bug 1386594, it's not clear to me there's anything left here.

Here's an up-to-date profile of doing a bunch of tabswitches: https://share.firefox.dev/3z0Fwhp

After removing samples where we're waiting on the OS to give us an event (ie doing nothing), I see ~160 samples with activity, and only 7 of those relate to updateIdentity/refreshIdentityBlock. Based on that I suspect that if we wanted to speed up tabswitches, we should look for perf improvements elsewhere first. So I'm going to resolve this for now.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.