perf: useMemo/useCallback/etc
transmissions11 opened this issue · 1 comments
transmissions11 commented
There's currently a lot of areas of the code where callbacks and objects could be memoized but are not. Some help here would be appreciated.
Only thing to note is the fact that nodes and edges (which are both objects) are at the core of everything makes things a little difficult I believe — as we'd need to do a deepequals check in some places which might end up being even more expensive?
transmissions11 commented
ideally we have some evidence that these changes actually improve performance and aren't just adding more complexity, as useCallback/useMemo do add some overhead if used incorrectly