Open Bug 1265450 Opened 9 years ago Updated 2 years ago

MessageLoop's postIdleTask only execute the task when ensureRunsAfterMS has elapsed

Categories

(Core :: IPC, defect, P3)

x86_64
macOS
defect

Tracking

()

People

(Reporter: zer0, Unassigned)

Details

(Whiteboard: btpp-backlog)

Maybe I misunderstood the usage of such method, however I notice that where I was working on bug 1262594. I was using mozbrowser's `getScreenshot` method, and I discovered that the screenshot took always 2s to be taken. That's because "dom.browserElement.maxScreenshotDelayMS" pref, that is set to 2000 ms, changing that will change the time the screenshot is taken too, see: https://dxr.mozilla.org/mozilla-central/source/dom/browser-element/BrowserElementChildPreload.js#982-992 However, that doesn't seems correct to me, it's like – at least on OS X – the event loop is somehow always busy, and then the task it's always executed when the `ensureRunsAfterMS` milliseconds have elapsed.
Can you find out whether the event loop is actually busy? The Gecko profiler (see https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem ) should let you find out. If it's not busy, maybe postIdleTask is broken on OS X with e10s.
Yeah it's possible this is just busted on Mac. We're going to overhaul how the event loop works anyways pretty soon.
Component: DOM: Content Processes → IPC
Whiteboard: btpp-backlog
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.