Skip to content

Performance Issue with Large Schema: Input Text Lag in rjsf Forms #4695

@ani9450

Description

@ani9450

Prerequisites

What theme are you using?

core

Version

5.x

Current Behavior

I am experiencing significant performance issues when using react-jsonschema-form (rjsf) with large schemas. Specifically, when entering text into input fields, there is noticeable lag and delay in rendering updates. This issue becomes more pronounced as the schema size increases, making the form almost unusable for schemas with thousands of properties or deeply nested structures.

Expected Behavior

  1. Input text updates should be instantaneous, regardless of schema size.
  2. The form should remain responsive during user interactions.

Steps To Reproduce

  1. Use a large schema (e.g., one with thousands of properties or deeply nested definitions).
  2. Render the form using rjsf.
  3. Attempt to type into an input field.
  4. you'll notice that the input text is laggy and delayed

NOTE : As i couldn't share any sandbox link, i have attached a large schema sample and a video highlighting the issue (you may use the attached schema in the playground and to replicate the issue -https://rjsf-team.github.io/react-jsonschema-form/)

Recording.7-22.at.14.18.webm

large_schema_sample.txt

Environment

- OS: windows 11
- Node: 22.16.0
- npm: 10.9.2

Anything else?

Questions -

  1. Is there a recommended limit on the size or complexity of JSON schemas to maintain optimal performance in rjsf ? As i have a use case of a schema which includes deeply nested definitions, large arrays, and multiple $ref references.
    I have also attached a video where i have tried with a large schema with dependency and the input lag is clearly visible -
Recording.7-22.at.16.33.webm

Any assistance on this would be deeply appreciated.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds triageInitial label given, to be assigned correct labels and assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions