Open Bug 1636996 Opened 5 months ago Updated 9 days ago

Defer UntrustedModuleProcessor work until later in startup

Categories

(Toolkit :: Startup and Profile System, enhancement)

enhancement

Tracking

()

People

(Reporter: dthayer, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [fxperf:p2])

I'm seeing a lot of IO on ref hw inside mozilla::AuthenticodeImpl::GetBinaryOrgName, called through mozilla::UntrustedModulesProcessor::ProcessModuleLoadQueue. This usually runs after first paint but before we finish painting about:home or whatever the first page to display is. On IO-bound systems we are still overloaded with IO at this point, so this is likely impacting the time until the first content is settled.

It seems like there's no reason we can't defer this a bit later? It already tries to defer itself until CPU idle, but that only gets you so far. Aaron, am I correct in thinking this?

Flags: needinfo?(aklotz)

Yeah, I was hoping that the CPU idle stuff would be enough, but feel free to postpone its initial run until a safe point.

Flags: needinfo?(aklotz)
Blocks: 1627071
Depends on: 1637024
Whiteboard: [fxperf] → [fxperf:p2]

This cold startup profile on the 2018 reference hardware shows the Untrusted Module thread doing I/O (and likely using CPU) before we are done displaying about:home. https://share.firefox.dev/3ckcHRf There's about 25s during which the Untrusted Module thread runs before we are done showing about:home.

(In reply to Florian Quèze [:florian] from comment #2)

This cold startup profile on the 2018 reference hardware shows the Untrusted Module thread doing I/O (and likely using CPU) before we are done displaying about:home. https://share.firefox.dev/3ckcHRf There's about 25s during which the Untrusted Module thread runs before we are done showing about:home.

Here is an even more impressive profile where the Untrusted Module thread starts about 2 minutes before about:home is done loading: https://share.firefox.dev/3jYOhQe

You need to log in before you can comment on or make changes to this bug.