Replies: 1 comment 1 reply
-
Hey @badsyntax Thanks for sharing your insights :) @peterkogo and I just talked about how we could use the new hooks for improving performance. Unfortunately we still support React 17. When the time comes (probably in a few weeks or months) we will start to work on a new version that drops support for React 17. Hopefully we can find some ways to improve the UX for larger flows then :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ReactFlow is such a useful library, many thanks to the authors and community.
Recently I've been struggling a bit to optimise my custom nodes. On massive workflows dragging nodes (especially many nodes at the same time) was rather leggy. Here's how I was able to resolve that.
At first I used React Scan and Million lint to identify excessive re-renders, then would try optimise those components. I identified many areas of improvement and with the use of startTransition(), useDeferredValue() and memo(), this resulted in a much more performant UI, but dragging massive workflows was still laggy, as I had not optimised efficiently (apparently).
I then tried something else that massively improved perf "at the flick of a switch": the React Compiler. Enabling the compiler on my custom nodes has effectively resolved most of the remaining perf issues, and dragging massive workflows is close to buttery smooth now. I've now learnt that the compiler is smarter than me.
In conclusion
Beta Was this translation helpful? Give feedback.
All reactions