Closed Bug 1366540 Opened 8 years ago Closed 8 years ago

Timeouts are throttled in some extension pages

Categories

(WebExtensions :: Untriaged, enhancement, P2)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ihor.ibm, Unassigned)

Details

(Whiteboard: [specification][type:bug][triaged])

What did you do? ================ 1. Used setTimeout inside an app 2. Tested it (about:debugging) as a web extension What happened? ============== Events that should have took tens of milliseconds to happen took seconds What should have happened? ========================== Obvoiusly, it should have worked same as it works everywhere else Is there anything else we should know? ======================================
Both with setTimeout and setInterval. It starts out normally for me, but then degrades after around two seconds and gets progressively worse and worse second after second. let interval_time = Date.now() setInterval( ()=>{ if ( Date.now() - interval_time > 100 ) { interval_time = Date.now() console.log ( 'good' , interval_time ) } else { console.log ( interval_time ) return; } } , 5 )
Or, better let interval_time = Date.now() setInterval( ()=>{ if ( Date.now() - interval_time > 100 ) { console.log ( 'good' , Date.now() - interval_time ) interval_time = Date.now() } else { console.log ( Date.now() - interval_time ) return; } } , 5 ) result: 18 main.eddbab88.js:7:5786 50 main.eddbab88.js:7:5786 good 101 main.eddbab88.js:7:5812 49 main.eddbab88.js:7:5786 99 main.eddbab88.js:7:5786 good 149 main.eddbab88.js:7:5812 49 main.eddbab88.js:7:5786 99 main.eddbab88.js:7:5786 good 149 main.eddbab88.js:7:5812 49 main.eddbab88.js:7:5786 good 104 main.eddbab88.js:7:5812 45 main.eddbab88.js:7:5786 95 main.eddbab88.js:7:5786 good 154 main.eddbab88.js:7:5812 41 main.eddbab88.js:7:5786 91 main.eddbab88.js:7:5786 good 148 main.eddbab88.js:7:5812 43 main.eddbab88.js:7:5786 good 103 main.eddbab88.js:7:5812 50 main.eddbab88.js:7:5786 90 main.eddbab88.js:7:5786 good 149 main.eddbab88.js:7:5812 58 main.eddbab88.js:7:5786 good 117 main.eddbab88.js:7:5812 30 main.eddbab88.js:7:5786 80 main.eddbab88.js:7:5786 good 148 main.eddbab88.js:7:5812 32 main.eddbab88.js:7:5786 95 main.eddbab88.js:7:5786 good 153 main.eddbab88.js:7:5812 59 main.eddbab88.js:7:5786 good 143 main.eddbab88.js:7:5812 84 main.eddbab88.js:7:5786 good 213 main.eddbab88.js:7:5812 good 195 main.eddbab88.js:7:5812 good 301 main.eddbab88.js:7:5812 good 454 main.eddbab88.js:7:5812 good 695 main.eddbab88.js:7:5812 good 1136 main.eddbab88.js:7:5812 good 1770 main.eddbab88.js:7:5812 good 3381 main.eddbab88.js:7:5812 good 4255 main.eddbab88.js:7:5812 good 6601 main.eddbab88.js:7:5812 good 9810
Component: API → WebExtensions: Untriaged
Product: Mozilla Developer Network → Toolkit
Summary: SetTimeout extremely slow inside WebExtensions → Timeouts are throttled in background pages
I'm not talking about background pages here, but about open active extension windows (browser_action ➙ popup)
Interesting.
Summary: Timeouts are throttled in background pages → Timeouts are throttled in some extension pages
Priority: -- → P2
Whiteboard: [specification][type:bug] → [specification][type:bug][triaged]
unable to reproduce.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.