reflex
reflex copied to clipboard
Responsiveness of controls are slow
Describe the bug Looking at a couple examples on the product page, there is a number of examples of slow front-end controls.
The canonical example in the Intro has a counter. It has a noticeable lag, looks like ~300ms[1], but feels like near a second.
Looking at the React wrapping demo, there is a noticeable latency when dragging the color circle around, but when I use the demo site for the original component, it has near-zero lag
To Reproduce Uses the above and you should feel lag
Expected behavior That all the Pyncone examples are fast with no extra effort. The simple example of a counter should show no lag, and the wrapped React counter should perform at the same as the component it is wrapping.
Screenshots
[1]
** Specifics (please complete the following information):**
- Browser: Chrome Version 110.0.5481.177 (Official Build) (x86_64)
Got it thanks for digging into this. I'll look into this more but I think this has to do with larger apps. We are working on ways to prevent other components that don't update from re-rendering and you should see performance improvements on the main website as a result.
Quick follow up. On the counter, I did not realize it was hitting the server to update the value. Assuming your UI does not need long-term state and instead wants to store up changes locally (e.g. building a dynamic form to submit), can you bind props to a local state store instead of server hosted state?
I am facing the same issue with the responsiveness. Please check the video attached for the tutorial in docs page:
https://user-images.githubusercontent.com/119093969/229191379-1731a48f-52f5-4ff5-a9b0-90579ec9cff7.mov
When running the same tutorial locally, it doesn't even respond.
When running the same tutorial locally, it doesn't even respond.
Are you running in dev mode or prod mode?
This might be addressed by #2198, which will optimize state updates in larger apps.
closing this issue for now