[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Doing some profiling.

Hi Steve,

This was a recent regression which has now been fixed at top of tree:



On Sun, Oct 17, 2010 at 10:38 AM, Steve Baker <steve@sjbaker.org> wrote:
I've been using the nifty performance analysis tools in Chrome to see
where the bottlenecks are in my code - everything is pretty evenly
spread - no one function is eating more than a few percent of CPU -
except for gl.useProgram - which is eating about 20% of my CPU.  That's
on a Dual-Core 3.5GHz Win7 machine with an nVidia  GTX 285.  Second
worst is matrix rotation at 2%!

My scene content is sorted by shader so I'm not switching programs more
often than I have to and there are no GL errors showing up. Most of my
meshes are pretty large (500 to 4000 verts), so it's a little surprising
that just telling WebGL which shader to use is taking so much time.
I'm guessing that calling gl.useProgram is actually stalling the GPU
pipeline - so what I'm actually seeing is the cost of mesh rendering
being subsumed into gl.useProgram...in which case, this isn't so surprising.

Anyway - just to be sure: Is there anything I need to know about
gl.useProgram that I could leverage to get some speedup?

 -- Steve

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: