question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance issues when running in development mode

See original GitHub issue

Describe the Bug

When running my application locally, I experience severe lags when dragging nodes. When opening this issue, I deployed the app on Netlify and noticed that the performance problems are vanished. I have attached videos that show this issue. The deployed version is available at https://react-flow--arguemapper.netlify.app.

Your Example Website or App

https://github.com/recap-utr/arguemapper/tree/react-flow

Steps to Reproduce the Bug or Issue

  1. Run the app locally.
  2. Click on Load Demo on the right sidebar.
  3. Move the nodes around on the canvas.

Expected behavior

The expected behavior can be seen on the deployed version.

Screenshots or Videos

https://user-images.githubusercontent.com/5160954/178964220-46fca166-2d9e-4bcb-9c0a-a646d9d4cd93.mp4

https://user-images.githubusercontent.com/5160954/178964304-45c1613c-1c1c-41ea-a7b3-5962b2f331b5.mp4

Platform

  • OS: macOS
  • Browser: Safari (also happens with the newest version of Chrome, but to a much lesser extent)
  • Version: 15.5

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mirkolenzcommented, Aug 10, 2022

Ah, ok. Thank you for the clarification. I will try to get rid of my “local” states with these tips 😄

0reactions
moklickcommented, Aug 9, 2022

We are using Zustand with a Provider (because there might be multiple RFs on a page or a user want to put the ReactFlowProvider somewhere higher in the tree) but if you are using Zustand the normal way you can just do:

const useStore = create(() => ({ nodes:[] }));

// somewhere in an event handler or useEffect
useStore.getState().nodes;

https://github.com/pmndrs/zustand#readingwriting-state-and-reacting-to-changes-outside-of-components

Read more comments on GitHub >

github_iconTop Results From Across the Web

GWT is slow in Development Mode - Stack Overflow
I'm using Eclipse Galileo with latest GWT 2.0 version in development mode, but it runs really slow (I ...
Read more >
How Does the Development Mode Work? - Overreacted
Yes, performance issues are bad. But so is shipping broken buggy experiences to the end users. For example, the React key warning helps...
Read more >
Debugging performance problems in React - LogRocket Blog
Learn how to debug performance problems in React with this post ... to work with React, you should be running the app in...
Read more >
Diagnosing performance issues early - Apple Developer
Identifying potential performance issues during development saves testing time later. Resolving performance issues, such as priority inversions and non-UI ...
Read more >
OutSystems running modes - Development vs Production mode
For a healthy development practice with OutSystems, customers need to be able to debug and have all available development functionality in the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found