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 with large forms

See original GitHub issue

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

Forms with large amount of fields (>100, as is often the case with arrays and nested subforms) take a long time to render.

The slowdown is most notable on initial render, where the form can take up to 10s of seconds to render initially. Renders after that are usually fast enough, but not super-fast, causing some input delay.

If I run the Chrome devtools, I can see that the initial render slowdown is caused by notifySubscriber taking more and more time as more fields are being registered, making me think that notifySubscriber is not O(1) but O(fields already registered).

I’m building forms recursively from a JSON schema, maybe react-final-form is not the right tool for the job since all fields are know in advance, so I don’t need the notifySubscriber at all?

What is the expected behavior?

Speedy Gonzales!

Sandbox Link

I’ll try and put together an example soon!

What’s your environment?

final-form 4.6.1
final-form-arrays 1.0.4
react 16.3.2
react-final-form 3.4.2
react-final-form-arrays 1.0.4

Other information

See also #230.

Here’s a profile I’ve made with Google Chrome, you should be able to load that as well. profile.json.txt

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:21
  • Comments:21 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
Dakkerscommented, Feb 3, 2021

Did George R.R. Martin write that pull request, by chance?

9reactions
Uznickcommented, Dec 29, 2019

@alirezavalizade any updates on that pull request? I’m facing this problem as well 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance of large forms on React | by Maxilect
For small forms, a few extra redraws of the component have no effect on performance. Now I'll tell how we've dealt with the...
Read more >
Performance issues on forms with large journal entries when ...
In cases of very heavy forms and large journal entries, the overall performance appears very slow, affecting typing within the journal fields, scrolling...
Read more >
Resolving Form Functional and Performance Issues
Performance and functional issues in forms may be caused by factors such as business rule execution settings and the complexity of business rules....
Read more >
Performance Issues with large dataset - Get Help - Gravity Forms
Additionally, with such a large dataset, you may be running into inherent performance limitations in GravityView or Gravity Forms.
Read more >
Improve the Performance of your React Forms
But often there's not a single bottleneck. Often the problem is that every user interaction triggers every component to re-render which is 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