Make DownloadPlatform use the dedicated low-priority background thread for macOS metafile work rather than a LazyIdleThread
Categories
(Toolkit :: Downloads API, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: mconley, Assigned: emmamalysz)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fxperf:p3])
Attachments
(1 file)
In bug 1355346, I landed a patch that added a new LazyIdleThread
(a thread that spins up on demand, and then goes away after a timeout) to DownloadPlatform.cpp, to do some work after downloads complete on macOS.
With bug 1450059 fixed, I suspect we can tear out that one-off thread, and use the dedicated low-priority background thread instead - presuming that it's alright that we do IO on that thread.
Assigning to plawless for now, since she was interested in taking on something like this.
Hey KrisWright, do you know if it's okay if we put disk IO on the low-priority background thread?
Comment 1•4 years ago
|
||
(In reply to Mike Conley (:mconley) (:⚙️) (Wayyyy behind on needinfos) from comment #0)
In bug 1355346, I landed a patch that added a new
LazyIdleThread
(a thread that spins up on demand, and then goes away after a timeout) to DownloadPlatform.cpp, to do some work after downloads complete on macOS.With bug 1450059 fixed, I suspect we can tear out that one-off thread, and use the dedicated low-priority background thread instead - presuming that it's alright that we do IO on that thread.
Assigning to plawless for now, since she was interested in taking on something like this.
Hey KrisWright, do you know if it's okay if we put disk IO on the low-priority background thread?
This is actually a thread I've looked at in the past as a candidate to throw onto some lazy/shared/background thread instance before we had the background thread. Since there's not many places that the background thread is being used right now and the job in bug 1355346 looks fairly self contained, it looks like it should be fine. Note that the background thread has a fairly small stack size, but as I recall LazyIdleThreads do as well so it probably won't affect anything. Maybe in the future we'll have some kind of API for a dedicated background IO thread, in which case this is an excellent candidate for one. For now I don't see a problem with using the background thread, unless any unexpected issues come up with it.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 2•3 years ago
|
||
I wanted to note for this bug that there's now a flag for dispatching blocking I/O, NS_DISPATCH_EVENT_MAY_BLOCK
[1], so that jobs like this can go to a dedicated I/O pool.
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Updated•3 years ago
|
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/294aa763e2a4 remove the usage of the LazyIdleThread from DownloadPlatform and instead use the low-priority background thread r=mconley,KrisWright
Comment 5•3 years ago
|
||
bugherder |
Description
•