- From: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
- Date: Mon, 19 Mar 2012 12:59:30 +0200
- To: public-audio@w3.org
- Message-ID: <CAJhzemWckX8whng5m7D7GaSVWanN4v3gkxzfShy8M_Zk=8-4fg@mail.gmail.com>
Oops, forgot reply all again. ---------- Forwarded message ---------- From: Jussi Kalliokoski <jussi.kalliokoski@gmail.com> Date: Mon, Mar 19, 2012 at 12:18 PM Subject: Re: Web Workers To: robert@ocallahan.org On Mon, Mar 19, 2012 at 6:15 AM, Robert O'Callahan <robert@ocallahan.org>wrote: > On Fri, Mar 16, 2012 at 12:29 AM, Jussi Kalliokoski < > jussi.kalliokoski@gmail.com> wrote: > >> Is postMessaging your samples to a Worker for playback a problem for >>> either of those cases? >>> >> >> Prety much yeah, that would make the suboptimal case even more so. It >> would be overtly difficult to get it reliable, even more so than with Audio >> Data API. > > > What do you mean by "reliable"? Doing work on the main thread is itself > inherently not reliable. > Hence making the suboptimal case even more so. > > What are you proposing to do to work around the throttling that browsers > impose on background tabs? Generally we want to be able to prevent > background tabs from hogging the main thread. We would rather not add new > features (like main-thread audio callbacks) that background tabs can use to > accidentally or deliberately hog the main thread. > It's possible to hog the main thread from the background tabs without using timers, too, using postMessage or worker communications, and that's even more expensive, but sometimes you need have audio in background tabs as well (music streaming services come first in mind). We can't tell in forehand what it's going to be used for, so I don't see the point in making it harder for the smart developer to do what he wants efficiently to make it harder just so that the less smart one didn't accidentally (especially when it's as unlikely as it is) make his application less efficient than he can. I think being a nanny for developers is a bad idea. This is a case where people are far more likely to know what they are doing than with setTimeout/setInterval, throttling which I don't think was a good idea either. > Rob > -- > “You have heard that it was said, ‘Love your neighbor and hate your > enemy.’ But I tell you, love your enemies and pray for those who persecute > you, that you may be children of your Father in heaven. ... If you love > those who love you, what reward will you get? Are not even the tax > collectors doing that? And if you greet only your own people, what are you > doing more than others?" [Matthew 5:43-47] > >
Received on Monday, 19 March 2012 10:59:59 UTC