Note that we have bug 990804 opened for providing such a service.
Unfortunately, this bug is currently stalled because we apparently
didn't have a clear idea of what API clients would need.

I'm willing to pick this for Q2, if there is interest.

Cheers,
 David

On 26/03/15 07:46, Randell Jesup wrote:
> As a result of some conversations on IRC, it came to light that a bunch
> of blocking IO operations were apparently moved off of MainThread
> (presumably to avoid UI 'jank'), and instead Dispatched to
> STREAMTRANSPORTSERVICE (aka STS thread).
> 
> Some examples pointed out to me: FilePicker, the spell-checker, the
> DeviceStorage DOM code, DOM cache code in Manager.cpp (via
> BodyStartWriteStream()), even perhaps ResolvedCallback in
> ServiceWorkers. (I haven't looked closely at all of the uses yet.)
> 
> Good, right?  No jank in the UI!  No - now the jank is in the network
> code!
> 
> STS is the primary network thread, and blocking that without a Darn Good
> Reason will cause all sorts of negative effects.  Page loads, XHR,
> WebSockets, WebRTC (which will react by adding delay to cover the
> 'jitter' in apparent network RTT) and many other things will have
> small-to-large negative impacts.
> 
> Perhaps some of these listed above (and others) don't block or even have
> a legitimate need to run on STS thread - ok, if so, comment as to why
> it's ok/needed.  Everyone else should not be using STS thread as a
> convenient target....
> 
> It does point out that with the need to get a lot of blocking operations
> off of MainThread, it would help other modules to have a single service
> or ThreadPool for dumping such operations to.  This would mean less
> code, less incorrect/undone thread shutdowns/etc. Thoughts?  (Perhaps
> such a service could use LazyIdleThreads, which will shut themselves
> down after inactivity.)
> 


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to