Re:Spin.js, a pure JS spinner
by seanalltogether on Thursday August 18, 2011 @12:48PM
(#2899929)
I hate to be that guy but this takes up 45% cpu under firefox for a simple spin animation.
[ Parent
| on HN ]
Re:Spin.js, a pure JS spinner
by robert-boehnke on Thursday August 18, 2011 @01:22PM
(#2900105)
My gut feeling is that if you rendered the different stages of the animation into multiple images using canvas and just toggled their visibility, you could get better performance.
I see the same problem in Opera too, except it's even worse (the animation lags, and it hogs a whole CPU core).
Explorer is better than Firefox and Opera, but still pretty high CPU usage.
The only browser of the ones I tested that it seems to be relatively fine in is Chrome.
Re:Spin.js, a pure JS spinner
by mrinterweb on Thursday August 18, 2011 @12:58PM
(#2899976)
100% on Chromium 13
Re:Spin.js, a pure JS spinner
by reemrevnivek on Thursday August 18, 2011 @02:02PM
(#2900294)
Same here, on Chromium 12 (wait, 12!?! Time to go fix that...) on Ubuntu 11.
Re:Spin.js, a pure JS spinner
by ralphsaunders on Thursday August 18, 2011 @01:13PM
(#2900063)
Getting around 20% to 35% on Chrome 15
Re:Spin.js, a pure JS spinner
by darrenkopp on Thursday August 18, 2011 @01:00PM
(#2899983)
1% on chrome
CPU time measurements, especially percentages, get very fuzzy when the CPU isn't loaded.
I'm on Chromium 12 on a Fedora 15 box. Top reports ~25% (on a dual core Arrandale, so that's about 1/8th the available CPU time), but checking the clocks more carefully shows that they're spending half their time in sleep states and never moving from the 1.2GHz base speed (this model turbos at 2.9GHz). So my envelope tells me this is about 4-5% usage vs. a fully loaded system.
Less than 10% CPU for me, with Firefox 6.0.
Interesting replies. 0% on IE 9 and Chrome 13, and 15% on firefox 5 (which translates to 60% of a core). Running Win 7 x64.
Aaaaaand... just upgraded to Firefox 6. 0%. Rather fickle piece of javascript, eh?
And just because why not:
IE 8 in a winXP vm: 0%
IE 6 in a winXP vm: 0%
Doesn't work in FF3.
3% cpu in Safari 5.1
Didn't realize this. Oh well. It's still cool and interesting, but I guess never that feasible.
Re:Spin.js, a pure JS spinner
by recoiledsnake on Thursday August 18, 2011 @03:33PM
(#2900697)
On Opera, whenever the spinners are visible, page scrolling is extremely laggy and slow.