Re: Web Workers

On Mon, Mar 19, 2012 at 11:59 PM, Jussi Kalliokoski <
jussi.kalliokoski@gmail.com> wrote:

> 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.
>

I appreciate how frustrating it must be for you and other competent
developers, but the reality is that as browser developers, catering to
"average" developers (and preventing them from causing damage) is something
we have to worry about a lot.

We have to be careful about logic like "developers who use this API will
know what they are doing", because it's normal for developers to
copy-and-paste code that they don't understand and tweak it until it works.

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 18:28:30 UTC