News for hackers. Stuff that matters.
Re:Show HN: ReactCircle – Renders SVG circle and percentage by zzarcon on Monday April 23, 2018 @08:56AM (#16902961)
Can you please try it again? the issue was not related with the component itself https://zzarcon.github.io/react-circle

let me know if you still experience that issue

Re:Show HN: ReactCircle – Renders SVG circle and percentage by whalesalad on Monday April 23, 2018 @09:54AM (#16903388)
If you turn off animation it's snappy.

I'd recommend either killing that altogether as it definitely gives the perception of bad performance.

Or... at least take into account the delta of the progress change when doing animation. For instance, if going from 5 to 10%... a slower animation is fine. If going from 0 to 100%, the animation should be much quicker.

Re:Show HN: ReactCircle – Renders SVG circle and percentage by muizelaar on Monday April 23, 2018 @10:18AM (#16903570)
The performance is still bad. It's spending roughly 20ms doing JS work per frame.

React profiles are not very easy to interpret but perhaps you're doing a lot more work per frame than you should be?

Here's the profile: https://perfht.ml/2F7ohwx

Re:Show HN: ReactCircle – Renders SVG circle and percentage by jannes on Monday April 23, 2018 @11:00AM (#16903970)
This file is the entire source of the component: https://github.com/zzarcon/react-circle/blob/57bb4d19df08b73...

A lot of the work seems to be the React diffing? The only thing that changes between frames when dragging the slider is the style attribute.

Furthermore, the author seems to have included the development version of React. And the author used development settings for the webpack compilation. The compiled JS is full of eval() calls.

Re:Show HN: ReactCircle – Renders SVG circle and percentage by akerro on Monday April 23, 2018 @09:05AM (#16903024)
It might be slightly better, but still far from performance I would expect from that component

https://gfycat.com/TerribleWeeArmadillo

Re:Show HN: ReactCircle – Renders SVG circle and percentage by chuckhendo on Monday April 23, 2018 @09:12AM (#16903089)
Is this Edge? I can confirm poor performance in Edge, but every other browse I've looked at seems to be ok.
Re:Show HN: ReactCircle – Renders SVG circle and percentage by akerro on Monday April 23, 2018 @09:18AM (#16903125)
That's Firefox on arch linux
Re:Show HN: ReactCircle – Renders SVG circle and percentage by zzarcon on Monday April 23, 2018 @09:12AM (#16903081)
Interesting... will have a deeper look into it, if you have any idea on how to make it better you are welcome
Re:Show HN: ReactCircle – Renders SVG circle and percentage by akerro on Monday April 23, 2018 @09:14AM (#16903097)
I actually work on low latency Java backends, I have no idea how this works ;)
Re:Show HN: ReactCircle – Renders SVG circle and percentage by rmrfrmrf on Monday April 23, 2018 @09:41AM (#16903287)
> low latency Java

(Does not compute)

Re:Show HN: ReactCircle – Renders SVG circle and percentage by akerro on Monday April 23, 2018 @09:42AM (#16903300)
Sure it doesnt ;)

The think that myth is coming from the fact that JVM is heavy (150MB?), so it takes time to start, and hot-spot needs some iterations on a source code before it can fully apply JIT, but other that that, Java is really good.