[whatwg] WebWorkers and images

On Fri, Jan 7, 2011 at 8:16 PM, Drew Wilson <atwilson at chromium.org> wrote:
> I would recommend that people review this
> thread:?http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-February/025254.html
> to understand the objections previously raised to this idea.

To comment on one thing in particular:

On Tue, Feb 23, 2010 at 12:05 AM, Jonas Sicking <jonas at sicking.cc> wrote:
> I admit to not being a graphics expert, but I would imagine you have
> to do quite a lot of drawing before
> 1. Drawing on offscreen canvas
> 2. Cloning the pixel data in order to ship it to a different thread
> 3. Drawing the pixel data to the on-screen canvas
> gets to be cheaper than
> 1. Drawing to on-screen canvas.

It's not about doing things more cheaply.  It's about not doing work
in the UI thread, where it can hold up the whole tab or worse.  Even
if it's somewhat more expensive in terms of CPU power used, doing this
sort of work in a thread can be a huge win: keeping the UI
consistently responsive.

I've seen it in practice: select an image in an image box, start
typing in another form field, and my typing freezes for half a second
while an invisible canvas operation runs.

-- 
Glenn Maynard

Received on Friday, 7 January 2011 18:39:54 UTC