开发者

High CPU Usage with WebGL?

I'm checking out the nightly builds of Firefox and Chromium with support of WebGL with a few demos and tutorials and I can't help but wonder about the extremely high CPU load they cause.

A simple demo like this one runs at a sustained 60% of my dual core. The large version of this one maxes out the CPU to 100% and has some visible frame loss.

Chromium seems to be slightly better than firefox but not by much. I'm pretty sure that if these were desktop application the CPU load would be negligible.

So what's going on here? what is it doing? Running the simple scripts of these can't be that demanding. Is it the extra layer of security 开发者_开发技巧or something?


Edit: I found the original demo which was porded to webgl here: http://rrrola.wz.cz/files/puls_win.zip

Running this (on full screen) gets the CPU to a sustained 48% so maybe I was wrong...


It is indeed true that webgl is slow. Becuase it is new, it uses a software compositor. So it is basicly does GPU - CPU - GPU calls for just one frame. Both firefox and webkit are working on it


Can't repro the performance issue. The first runs at 98-100fps using just under one core of my Core i5. The second uses about 50% of one core.

This is with Chrome dev channel, Windows 7 64-bit, Radeon HD 5770, in other words a moderately powerful modern machine.

Also note that a small code size doesn't equate to fast, when there's a lot of iteration (and these demos appear to have a lot of polygons).


Graphics rendering is extremely CPU intensive, that's why there are video cards with GPU's so that work can be off loaded to them instead. I'll try out your demos and see how they go on my computer which does have a decent video card installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜