Closed Bug 1661339 Opened 1 year ago Closed 1 year ago

Run the background tasks for gathering printer capabilities on the IO thread pool

Categories

(Core :: Printing: Setup, defect, P1)

defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

(Keywords: perf, Whiteboard: [print2020_v81])

Attachments

(1 file)

Bob has discovered while adding telemetry that sometimes the entire roundtrip from the main thread to the background task thread and back again is taking substantially longer than the time to make the blocking calls on the background thread.

I asked about whether we can somehow give the tasks a higher priority in the #xpcom Matrix channel. However, unfortunately background tasks can't currently be given a priority. :-( Creating our own dedicated thread [pool] is also only something to consider as a last resort.

One thing that we noticed is that we're failing to pass NS_DISPATCH_EVENT_MAY_BLOCK when calling NS_DispatchBackgroundTask, which we're required to do for blocking tasks. Passing that will make the tasks run on the IO pool, and kriswright tells me that since that poll has more threads we may get better responsiveness.

Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/3bd84146cbf6
Run the background tasks for gathering printer capabilities on the IO thread pool. r=emilio
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Comment on attachment 9172252 [details]
Bug 1661339. Run the background tasks for gathering printer capabilities on the IO thread pool. r=emilio

Beta/Release Uplift Approval Request

  • User impact if declined: Potential jankiness due to running blocking tasks on the wrong thread pool.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just switching background task thread pool to the correct pool.
  • String changes made/needed:
Attachment #9172252 - Flags: approval-mozilla-beta?

Comment on attachment 9172252 [details]
Bug 1661339. Run the background tasks for gathering printer capabilities on the IO thread pool. r=emilio

approved for 81.0b3

Attachment #9172252 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.