Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-render performance issue #70

Open
ghoshorn opened this issue Feb 24, 2025 · 2 comments
Open

re-render performance issue #70

ghoshorn opened this issue Feb 24, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@ghoshorn
Copy link
Contributor

Hi, @guidone hope everything goes well!

Recently when I use the form, say about 100 fields, with half of them having a script. With empty defaultValues, the re-render is evidently slower(more than 5s and makes the browser hang) than the initial rendering.

Here I have a demo, on the top I have a button, which will do nothing but change a state and makes the page rerender. You can see the page got stucked for seconds and after a while you can finally see the clicking makes the selection button changed. Please refer to the demo below:

form-performance.mov.zip

@guidone
Copy link
Owner

guidone commented Feb 24, 2025

I see the problem.

Questions:

  • is the slowness happening only with empty defaultValues (this is ringing me a bell in the past while I was searching for a bug related to unintended re-renders)
  • can you share the form (I understand you may not want to share it here, can you send it to [email protected]?)

@guidone guidone added the bug Something isn't working label Feb 24, 2025
@ghoshorn
Copy link
Contributor Author

@guidone Hi, actually I have not yet tested the form with data, but I can share the form with you first, and will try it with data later and share the result with you.
Glad if this can help a little to find the bug, sent to your gmail ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants