News for hackers. Stuff that matters.
Re:Show HN: ReactCircle – Renders SVG circle and percentage by jannes on Monday April 23, 2018 @08:22AM (#16902719)
Very cool!

However, I'm getting very low FPS when dragging the slider in Firefox on OSX (especially when dragging long distance in a short time). Is this due to the SVG rendering performance of Firefox or due to your code?

Turning off animations doesn't seem to make a difference.

Re:Show HN: ReactCircle – Renders SVG circle and percentage by zzarcon on Monday April 23, 2018 @08:42AM (#16902860)
Thanks for the feedback! You are right, the demo currently hangs quite a lot on Firefox, Im pretty sure the issue is actually not related with the component itself, I created a issue on the repo to fix it https://github.com/zzarcon/react-circle/issues/10 :)
Re:Show HN: ReactCircle – Renders SVG circle and percentage by jannes on Monday April 23, 2018 @11:13AM (#16904100)
Thanks! That already works a lot better.

To further improve things, I would suggest two changes to your webpack config:

1. Use the production version of React. It seems that you are using the slightly slower development version. (In webpack this is done by defining process.env.NODE_ENV = "production" and eliminating dead code afterwards)

2. Stop using webpack in development mode for your deployment. There are 272 eval() calls in your bundle because of this: https://raw.githubusercontent.com/zzarcon/react-circle/c1480...

Both of these things are already taken care of by the production mode in webpack 4.

Re:Show HN: ReactCircle – Renders SVG circle and percentage by zzarcon on Thursday April 26, 2018 @04:00AM (#16929851)
You are so right!!

Im using an external tool for deploying the site, created a PR there to use production mode, do you think that should be enough? Thanks! https://github.com/zzarcon/ts-react-toolbox/pull/2

Re:Show HN: ReactCircle – Renders SVG circle and percentage by muizelaar on Monday April 23, 2018 @01:03PM (#16905257)
It looks like the whole app is re-rendering every frame instead of just having the stroke properties animate: https://perfht.ml/2vEbUc6
Re:Show HN: ReactCircle – Renders SVG circle and percentage by djstein on Monday April 23, 2018 @10:45AM (#16903811)
runs really fast in nightly however
Re:Show HN: ReactCircle – Renders SVG circle and percentage by jannes on Monday April 23, 2018 @11:42AM (#16904390)
I think the author already patched it and that's why you're not seeing the same problem. Now it runs faster for me, too. (But HN doesn't allow me to edit my original comment anymore)