[Public WebGL] WebKit 20-50% slower than Chrome/Minefield using large Float32Array Arrays

Stephen Bannasch [email protected]
Fri Feb 25 08:28:56 PST 2011

At 9:55 AM -0800 2/24/11, Vladimir Vukicevic wrote:
>I've actually done that in https://bugzilla.mozilla.org/show_bug.cgi?id=636096 that I filed for this issue.
>Second, modifying innerHTML inside your benchmark loop is not ideal as that can be a pretty slow operation... certainly valid thing to do for a normal app, but not great for a benchmark unless you're explicitly testing innerHTML setting speed.

I misunderstood your comment about using innerHTML inside my simulation. I thought you were referring to running the alternate rendering method using the 10,000 colored divs.

It didn't even occur to me that using the one innerHTML statement to update the number of model steps run and the current framerate would have any noticeable affect of the overall speed of running the computational simulation.

My demo is both a way to test my port of the simulation from Java itself, a way to measure the speed of model and a way to evaluate several ways of rendering the model data.

It makes sense when used as a benchmark for testing Typed and regular array and computational processing to extract all theinteraction with the display/dom the way you have here:


As a test for looking at a combined system (which is what users will experience) including the rendering methods makes sense.

I haven't extracted the rendering methods themselves to separate these data from the affect of running the model at different speeds but I am struck by how much slower Minefield is with innerHTML than WebKIt (Safari/Chrome).

Running the model using typed arrays and rendering to the 10,000 colored divs with innerHTML:

Minefield         0.4
WebKit nightly:   2.4
Chrome 10         2.8

There are two steps in my 10,000 divs rendering method, I use a table-driven pattern to construct a colorDivsStr string of 10,000 divs and then use one innerHTML method call to insert colorDivsStr into the dom.


The updated canvas rendering method I'm using now is faster in all cases so I won't be using the colored-divs method but perhaps it could be extracted as another benchmark. I don't know how much time is proportionally spent constructing the string and how much is the innerHTML method call but it's clear that it's a performance issue in Minefield compared to Safari and Chrome.
You are currently subscribed to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:
unsubscribe public_webgl

More information about the public_webgl mailing list