Closed Bug 1646799 Opened 4 years ago Closed 4 years ago

setInterval(..., 0) is not clamped, unlike setTimeout(..., 0)

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla80
Performance Impact medium
Tracking Status
firefox-esr68 --- wontfix
firefox-esr78 --- wontfix
firefox79 --- wontfix
firefox80 --- fixed

People

(Reporter: mstange, Assigned: smaug)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: parity-chrome, perf:responsiveness, regression)

Attachments

(2 files)

Attached file testcase

In this testcase, Firefox reports one call every 0.009ms, and Chrome reports one call every ~4ms.

This is causing excess resource usage on misbehaving websites such as https://www.gamesradar.com/ .

Whiteboard: [qf]
Severity: -- → S3
Priority: -- → P3
Whiteboard: [qf] → [qf:p2:responsiveness]

I'm not sure where that See also fits in, the behavior is occuring only in the active tab?

(In reply to Danial Horton from comment #1)

I'm not sure where that See also fits in, the behavior is occuring only in the active tab?

The ticket linked under "See Also"? It's also about throttling of the same method, therefore it could be relevant.

Blocks: 1649892
Blocks: 1649890

Some of these sites along with the quantcast script that causes this, are also loading a widget that also causes it, from https://widgets.future-fie.co.uk/

Note that on https://www.gamesradar.com/ and others, the offending setInterval() calls look like:

setInterval("function() { [native code] }", NaN);
Summary: setInterval(..., 0) is not throttled, unlike setTimeout(..., 0) → setInterval(..., 0) is not clamped, unlike setTimeout(..., 0)
Assignee: nobody → bugs
Regressed by: 512645
Regressed by: 1378586
No longer regressed by: 512645
Has Regression Range: --- → yes

hmm, I lost the link to my tryserver push.
Doing it again: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8d2573cf95c064aefc6015a735fd41425266d93f
And apparently I had left a tiny bug in the test.

Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1df40ae8828d setInterval(..., 0) is not clamped, unlike setTimeout(..., 0), r=peterv
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
QA Whiteboard: [qa-80b-p2]
Performance Impact: --- → P2
Whiteboard: [qf:p2:responsiveness]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: