5 ms·
The bugs in the background are fun to watch. They actually eat each other from time to time. Though it does seem to require some CPU power and got my fans to sp
by hmottestad 13y ago
The bugs in the background are fun to watch. They actually eat each other from time to time. Though it does seem to require some CPU power and got my fans to spin up a bit.
- marijn 13y agoIf you watch really closely, they even 'mate' and lay eggs. And yes, it's a huge cpu hog. But it will pause when you unfocus/hide the page.
- brokenparser 13y agoIt completely trashes Firefox here, not exactly a compelling argument for a site like this.
- marijn 13y agoYou're right. Seems some recent change in FF upped their requestAnimationFrame fire rate, or I made some change since I last tested it that causes the slowdown. In any case, try to refresh, should be smoother now (I've added a mechanism that reduces the framerate when the animation is eating up too much processing time).
- brokenparser 13y agoI can barely scroll with the animation turned off, on a 2.8GHz CPU (it only returns to normal when reloading the page with js disabled). It's times like this when I really appreciate NoScript, but the pledge link only appears with js enabled. The fancy background could be hurting you in the pocket.
- marijn 13y agoOdd. Is your screen huge? Your machine slow? Anyway, I've made it so that the bitmaps are hidden when the animation is disabled, since they are the most likely candidate for making scrolling slow.
- brokenparser 13y agoThat works, clicking "animation" restores Firefox back to normal. What's weird though, is that the usual slow script warning doesn't work here. That shouldn't happen and might be a regression. And no to both, although it's probably slower than yours. Even with 170x140 and the main div removed (responsive design view), it won't animate.
- marijn 13y agoThe slow script warning, as far as I understand it, only fires when the script runs uninterrupted for a certain time. This was a case of animation frames taking up more time than their framerate, and thus firing end-to-end, killing the responsiveness of the browser itself.
- coldtea 13y agoWhat kind of machines do you use? I use a 2010 MacBook Pro and have no issues. Chrome beta.
- brokenparser 13y agoTry Firefox, my box is newer.
- sebnukem2 13y agoI have no problem on Firefox, it's very smooth, but does draw a little bit of CPU power.
- RobinL 13y agoI imagine it's an extension of the 'terrarium' example which is used to demonstrate OOP in javascript in the first edition of this book.... [edit - yes - it says this at the bottom of the page!]