Schedule Safebrowsing.init() using requestIdleCallback instead of setTimeout

RESOLVED DUPLICATE of bug 1376591

Status

()

Toolkit
Safe Browsing
RESOLVED DUPLICATE of bug 1376591
10 months ago
10 months ago

People

(Reporter: Felipe, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 months ago
Currently, SafeBrowsing.init() is scheduled off a 2sec setTimeout call from _delayedStartup.  This means that it can arbitrarily start running while the browser is not idle, and it might hang the browser for the user while they are interacting.

This is some critical code, so we can't postpone it forever.. But if we use requestIdleCallback with a small timeout (say, 10s?), it has a better change of being scheduled on a more appropriate time.

Updated

10 months ago
Whiteboard: [photon-performance] → [photon-performance] [triage]
We should also move this to nsBrowserGlue.js so that it doesn't happen for each new window.
Blocks: 1300126
(In reply to :Felipe Gomes (needinfo me!) from comment #0)
> This is some critical code, so we can't postpone it forever.. But if we use
> requestIdleCallback with a small timeout (say, 10s?), it has a better change
> of being scheduled on a more appropriate time.

As far as I know, it's also required as soon as you want to load a URL. I'm not sure we can relay delay it.

Updated

10 months ago
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [photon-performance] [triage] → [photon-performance]

Updated

10 months ago
See Also: → bug 1376591
This will be rolled into bug 1376591.
Status: NEW → RESOLVED
Last Resolved: 10 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1376591

Updated

10 months ago
Flags: qe-verify-
Priority: P2 → --
Whiteboard: [photon-performance]
You need to log in before you can comment on or make changes to this bug.