RE: [Efficient Script Yielding] - Clamping

On Fri, 1 Jul 2011, Jason Weber wrote:
> 
> There will always be buggy code in the world and people will always 
> abuse API's including setImmediate. I have faith web developers will be 
> able to use the new API appropriately.

I have faith that some will.

But I'm also convinced that some high-profile sites will use it to do 
something expensive in a tight loop, they won't notice it's pegging their 
CPU because they're testing on a desktop, and then browser vendors will 
force a clamp of some sort to save CPU cycles.

And then we're back to setTimeout(..., 0).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Saturday, 2 July 2011 00:08:43 UTC