3 ms·
It seems beyond absurd to me, that this tiny animation should be costing as much as 6% of CPU. There has to be more optimal ways to do this.
by Varelion 1y ago
It seems beyond absurd to me, that this tiny animation should be costing as much as 6% of CPU.
There has to be more optimal ways to do this.
- MITSardine 1y agoSo, the CRAY-2 built in 1985 was rated at 1.9 GFLOPS. The M2 the author uses seems to be benchmarked at around 6GFLOPs per core [1]. So this 6% of the author's CPU (assuming charitably this is a single core) corresponds to about 20% of the mid 80's peak supercomputer capacity. People were already using those computers for applications that go slightly beyond animating 5 x 3 green little bars up and down at the time... I understand dev time cost > CPU time cost (for the company that hires the developpers anyways) but aren't things getting a little out of hand? Even without comparing to an 80's supercomputer, what if someone with a 15 years old laptop tries to use their app? What will those 6% CPU on the dev's shiny M2 MBP become? [1] https://boinc.bakerlab.org/rosetta/cpu_list.php https://boinc.bakerlab.org/rosetta/cpu_list.php
- utopman 1y agoThis. I did not find other comments like this in this thread. 6% M2 cpu (even single core) is a huge computing budget for such a small feature. At this point I don't really understand why OP seems happy with this result (sorry). I think even a naive canvas implementation can really and quite easily cut most of this computing budget. Also, a pure css animated thing should use mostly gpu in a right DOM implementation. I think some issues remains in this result. Maybe OP displays it's app on a 240hz external screen which makes browser compute DOM animation at 240 fps requiring slighly more compute in a passive way (4o-mini suggests this, I am not sure browser works like this) I remember too much of my pentium 1 166Mhz let run entire age of empires 2 game in 1997
- efilife 1y agoI did find a comment like this. It's dead https://news.ycombinator.com/item?id=44653068 https://news.ycombinator.com/item?id=44653068
- makeitdouble 1y agoI assume 6% is for the whole page. That's still a lot for a single page IMHO, but it seems that service is doing resource expensive things in the first place.