[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Doing some profiling.
- To: public webgl <email@example.com>
- Subject: [Public WebGL] Doing some profiling.
- From: Steve Baker <firstname.lastname@example.org>
- Date: Sun, 17 Oct 2010 12:38:33 -0500
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=sjbaker.org; h=message-id :date:from:mime-version:to:subject:content-type: content-transfer-encoding; s=sjbaker.org; bh=m00jkRnxAlYw1KV/KFQ uBr03/zo=; b=kr1HY9SJhAFr+7F3QAAG3J9Pw7Vy1j4qm1zDbS6OeaXYgk7uIDc cIOTMmIgbajcBzgYbDPc3vRemSC4aEhjCY6CxummmjRXLQ8OhGynq0qSQ/RH0YA7 kzIqxZAs/YCLSqusLC2WtYCTXF9FtuBCgED7LyAr3N1Vq77mHIxgLqIc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=sjbaker.org; h=message-id:date :from:mime-version:to:subject:content-type: content-transfer-encoding; q=dns; s=sjbaker.org; b=hrD7BxKVDRduS nRSc1MsRUs6NByKhrYkdXFYgsBZRNhAO5TumeyecKndleMR3wspv8n24jn9jz+8J bU78U9Jd/T9FatUFEFcIVTP1iSUWmPUqJ1KjxIEDGKGz4s+crHg3uLlbdpSBjo4W 9U5+fGgLHibmi5iOfubMPcXJMUAdyo=
- Sender: email@example.com
- User-agent: Thunderbird 220.127.116.11 (X11/20100302)
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?
You are currently subscribed to firstname.lastname@example.org.
To unsubscribe, send an email to email@example.com with
the following command in the body of your email: