Skip to content

Comment on Internet Explorer Canvas Tag Massively Faster Than Chrome

Comments

I haven't yet looked into the code generating this site, but correct me if i'm wrong but isn't a higher FPS largely useless if your monitor cannot display it?

In other words, the code at http://www.nerds-central.com/Linear-Scan-Test.html looks like this code is using the antiquated setTimeout() method of determining frame rate.

A better way to do it, at least for chrome and firefox users, is to use the newer requestAnimationFrame() function: http://paulirish.com/2011/requestanimationframe-for-smart-an... This allows for the browser to notify the script when its ready to display a new frame, resulting in more efficient animation execution.

Using FPS for benchmarking is good, but suffers from the same shortcomings as glxgears.

Following up, the site uses "setTimeout(function, 0)" which is akin to an unencumbered while() loop. Great if you want raw power but pointless if you cannot use it (in this case, to display unique data).

Perhaps Chromium 16 has tied sites that incorrectly use setTimeout() for animations to this newer method: http://dev.chromium.org/developers/design-documents/requesta...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.