Re: [ScriptYielding] setImmediate clamping returns.

On Tue, 13 Aug 2013 05:11:54 +0400, Kyle Simpson <getify@gmail.com> wrote:

>> Please, find a flaw. Please, make a better, more in depth analysis that  
>> shows that browsers will keep not clamping.
>> Really on this one, I really want to be wrong. I really want someone  
>> comes up with elements I haven't thought of.
>
> The flaw I see is that you're practicing pessimism-driven design.

I don't think so. I think David is practising  
"learn-from-our-mistakes-driven design"...

> ------------------
>
> I made this analogy on the FF thread, and it was largely ignored. I'll  
> re-try here.
>
> requestAnimationFrame() can be abused.

But it is not clear that the response from browsers will be to break  
something fundamental about rAF if it is abused.

> At this point, we're going to be faced with the same questions we are  
> debating theoretically here about setImmediate().
>
> If the same mindset that DID neuter setTimeout(..0) and would apparently  
> inevitably neuter setImmediate(), the pessimism-driven design that if it  
> can be abused, it will be abused, and if it's abused and we're the ones  
> who get hurt, we'll be "forced" to do unspeakable evils to save our  
> public reputation…

I don't think that's what David is saying. I think he is pointing to a  
known pattern, for which browsers have a known incentive to optimise (what  
David says about how browsers actively work to get better speed is true,  
and while high profile real websites make bugs go on the "critical" list,  
it *can* happen without anyone really seeing the cause since they can't  
read the minds of all browser developers), and for which there is a known  
(and implemented) optimisation.

You wrote earlier about people relying on the 10ms cycle as a timer as a  
hypothetical. I have a vague recollection of discovering (when there was a  
move to 4ms) that this was a real practice, but I guess Chrome either  
never discovered that or were happy enough to break the site and let them  
fix it.

> if THAT mindset also is going to eventually be applied to rAF, then we  
> should take rAF out right now, because it's also doomed.
>
> ---
> If you'd like me to create a demo ... I'm sure I can. That'll force the  
> analogy.

If it is also one that you can market to other people.

It turns out to be much more important when a key site does it - perhaps a  
bank, or something you never actually would use but that many people do.

> ---
>
> Or, we can take a level head and say, we can't fear the idiots and let  
> that hold back the platform. We can't ignore the abuses, but we can't  
> live in fear of it either. We have to be balanced. We have to be  
> creative. And most of all, we have to be willing to, sometimes, not  
> choose the politically convenient/expedient answer.

Sure, but "we don't mind our product sucking, if it means we respect the  
standards" isn't typically something that product managers say at planning  
meetings. Nor is it something users actually ask for...

cheers

Chaals

-- 
Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
       chaals@yandex-team.ru         Find more at http://yandex.com

Received on Wednesday, 14 August 2013 12:31:35 UTC