rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.17k stars 2.18k forks source link

Form rendering is slow when "OneOf" property is defined at nested levels #2661

Closed KittyJose closed 8 months ago

KittyJose commented 2 years ago

Description Form rendering is very slow when "OneOf" property is defined.

Steps to Reproduce

  1. Copy below provided SCHEMA, which has OneOf defined in nested levels... on rendering Form takes a lot of time (minimum 45 seconds to 2 minutes).

  2. One of works perfectly on a small schema with less nested levels. But on large schemas the webpage gets frozen and stuck.

  3. I suspect the reason is in SchemaField.js => on encountering one of property the whole schema is rechecked everytime to encounter another one of within the schema and the process goes on recursively. It would be great if we could resolve this recursive schema checking faster or maybe turn off schema checking if oneOf options properties are defined from the front end.

  4. Reproduce by using below schema

    
    {
    "type": "object",
    "properties": {
    "general_variables": {
      "type": "object",
      "title": "general_variables",
      "info": "SUBDOCUMENT",
      "properties": {
        "alternative_names": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "AlternativeNames",
                  "default": "AlternativeNames"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "AlternativeNames",
                "default": "AlternativeNames"
              }
            }
          }
        },
        "capital": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Capital",
                  "default": "Capital"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Capital",
                "default": "Capital"
              }
            }
          }
        },
        "degree_of_centralization": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "DegreeOfCentralization",
                  "default": "DegreeOfCentralization"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "DegreeOfCentralization",
                "default": "DegreeOfCentralization"
              }
            }
          }
        },
        "duration": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Duration",
                  "default": "Duration"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Duration",
                "default": "Duration"
              }
            }
          }
        },
        "language": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Language",
                  "default": "Language"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Language",
                "default": "Language"
              }
            }
          }
        },
        "original_name": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "OriginalName",
                  "default": "OriginalName"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "OriginalName",
                "default": "OriginalName"
              }
            }
          }
        },
        "peak_date": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "PeakDate",
                  "default": "PeakDate"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "PeakDate",
                "default": "PeakDate"
              }
            }
          }
        },
        "preceding_%28quasi%29polity": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Preceding%28Quasi%29Polity",
                  "default": "Preceding%28Quasi%29Polity"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Preceding%28Quasi%29Polity",
                "default": "Preceding%28Quasi%29Polity"
              }
            }
          }
        },
        "ra": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Ra",
                  "default": "Ra"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Ra",
                "default": "Ra"
              }
            }
          }
        },
        "relationship_to_preceding_%28quasi%29polity": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "RelationshipToPreceding%28Quasi%29Polity",
                  "default": "RelationshipToPreceding%28Quasi%29Polity"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "RelationshipToPreceding%28Quasi%29Polity",
                "default": "RelationshipToPreceding%28Quasi%29Polity"
              }
            }
          }
        },
        "scale_of_supra-cultural_interaction": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "ScaleOfSupra-CulturalInteraction",
                  "default": "ScaleOfSupra-CulturalInteraction"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "ScaleOfSupra-CulturalInteraction",
                "default": "ScaleOfSupra-CulturalInteraction"
              }
            }
          }
        },
        "succeeding_%28quasi%29polity": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Succeeding%28Quasi%29Polity",
                  "default": "Succeeding%28Quasi%29Polity"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Succeeding%28Quasi%29Polity",
                "default": "Succeeding%28Quasi%29Polity"
              }
            }
          }
        },
        "supra-polity_relations": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Supra-PolityRelations",
                  "default": "Supra-PolityRelations"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Supra-PolityRelations",
                "default": "Supra-PolityRelations"
              }
            }
          }
        },
        "supracultural_entity": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "SupraculturalEntity",
                  "default": "SupraculturalEntity"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "SupraculturalEntity",
                "default": "SupraculturalEntity"
              }
            }
          }
        },
        "@type": {
          "type": "string",
          "title": "GeneralVariables",
          "default": "GeneralVariables"
        }
      }
    },
    "institutional_variables": {
      "type": "object",
      "title": "institutional_variables",
      "info": "SUBDOCUMENT",
      "properties": {
        "limits_on_power_of_the_chief_executive": {
          "type": "object",
          "title": "limits_on_power_of_the_chief_executive",
          "info": "SUBDOCUMENT",
          "properties": {
            "constraint_on_executive_by_government": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "ConstraintOnExecutiveByGovernment",
                      "default": "ConstraintOnExecutiveByGovernment"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "ConstraintOnExecutiveByGovernment",
                    "default": "ConstraintOnExecutiveByGovernment"
                  }
                }
              }
            },
            "constraint_on_executive_by_non-government": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "ConstraintOnExecutiveByNon-Government",
                      "default": "ConstraintOnExecutiveByNon-Government"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "ConstraintOnExecutiveByNon-Government",
                    "default": "ConstraintOnExecutiveByNon-Government"
                  }
                }
              }
            },
            "impeachment": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "Impeachment",
                      "default": "Impeachment"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "Impeachment",
                    "default": "Impeachment"
                  }
                }
              }
            },
            "@type": {
              "type": "string",
              "title": "LimitsOnPowerOfTheChiefExecutive",
              "default": "LimitsOnPowerOfTheChiefExecutive"
            }
          }
        },
        "ra": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Ra",
                  "default": "Ra"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Ra",
                "default": "Ra"
              }
            }
          }
        },
        "@type": {
          "type": "string",
          "title": "InstitutionalVariables",
          "default": "InstitutionalVariables"
        }
      }
    },
    "religion_and_normative_ideology": {
      "type": "object",
      "title": "religion_and_normative_ideology",
      "info": "SUBDOCUMENT",
      "properties": {
        "deification_of_rulers": {
          "type": "object",
          "title": "deification_of_rulers",
          "info": "SUBDOCUMENT",
          "properties": {
            "rulers_are_gods": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "RulersAreGods",
                      "default": "RulersAreGods"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "RulersAreGods",
                    "default": "RulersAreGods"
                  }
                }
              }
            },
            "rulers_are_legitimated_by_gods": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "RulersAreLegitimatedByGods",
                      "default": "RulersAreLegitimatedByGods"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "RulersAreLegitimatedByGods",
                    "default": "RulersAreLegitimatedByGods"
                  }
                }
              }
            },
            "@type": {
              "type": "string",
              "title": "DeificationOfRulers",
              "default": "DeificationOfRulers"
            }
          }
        },
        "moralizing_supernatural_powers": {
          "type": "object",
          "title": "moralizing_supernatural_powers",
          "info": "SUBDOCUMENT",
          "properties": {
            "moral_concern_is_primary": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralConcernIsPrimary",
                      "default": "MoralConcernIsPrimary"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralConcernIsPrimary",
                    "default": "MoralConcernIsPrimary"
                  }
                }
              }
            },
            "moralizing_enforcement_in_afterlife": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementInAfterlife",
                      "default": "MoralizingEnforcementInAfterlife"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementInAfterlife",
                    "default": "MoralizingEnforcementInAfterlife"
                  }
                }
              }
            },
            "moralizing_enforcement_in_this_life": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementInThisLife",
                      "default": "MoralizingEnforcementInThisLife"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementInThisLife",
                    "default": "MoralizingEnforcementInThisLife"
                  }
                }
              }
            },
            "moralizing_enforcement_is_agentic": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementIsAgentic",
                      "default": "MoralizingEnforcementIsAgentic"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementIsAgentic",
                    "default": "MoralizingEnforcementIsAgentic"
                  }
                }
              }
            },
            "moralizing_enforcement_is_certain": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementIsCertain",
                      "default": "MoralizingEnforcementIsCertain"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementIsCertain",
                    "default": "MoralizingEnforcementIsCertain"
                  }
                }
              }
            },
            "moralizing_enforcement_is_targeted": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementIsTargeted",
                      "default": "MoralizingEnforcementIsTargeted"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementIsTargeted",
                    "default": "MoralizingEnforcementIsTargeted"
                  }
                }
              }
            },
            "moralizing_enforcement_of_rulers": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingEnforcementOfRulers",
                      "default": "MoralizingEnforcementOfRulers"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingEnforcementOfRulers",
                    "default": "MoralizingEnforcementOfRulers"
                  }
                }
              }
            },
            "moralizing_norms_are_broad": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingNormsAreBroad",
                      "default": "MoralizingNormsAreBroad"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingNormsAreBroad",
                    "default": "MoralizingNormsAreBroad"
                  }
                }
              }
            },
            "moralizing_religion_adopted_by_commoners": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingReligionAdoptedByCommoners",
                      "default": "MoralizingReligionAdoptedByCommoners"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingReligionAdoptedByCommoners",
                    "default": "MoralizingReligionAdoptedByCommoners"
                  }
                }
              }
            },
            "moralizing_religion_adopted_by_elites": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "MoralizingReligionAdoptedByElites",
                      "default": "MoralizingReligionAdoptedByElites"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "MoralizingReligionAdoptedByElites",
                    "default": "MoralizingReligionAdoptedByElites"
                  }
                }
              }
            },
            "@type": {
              "type": "string",
              "title": "MoralizingSupernaturalPowers",
              "default": "MoralizingSupernaturalPowers"
            }
          }
        },
        "normative_ideological_aspects_of_equity_and_prosociality": {
          "type": "object",
          "title": "normative_ideological_aspects_of_equity_and_prosociality",
          "info": "SUBDOCUMENT",
          "properties": {
            "ideological_reinforcement_of_equality": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "IdeologicalReinforcementOfEquality",
                      "default": "IdeologicalReinforcementOfEquality"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "IdeologicalReinforcementOfEquality",
                    "default": "IdeologicalReinforcementOfEquality"
                  }
                }
              }
            },
            "ideological_thought_equates_elites_and_commoners": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "IdeologicalThoughtEquatesElitesAndCommoners",
                      "default": "IdeologicalThoughtEquatesElitesAndCommoners"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "IdeologicalThoughtEquatesElitesAndCommoners",
                    "default": "IdeologicalThoughtEquatesElitesAndCommoners"
                  }
                }
              }
            },
            "ideological_thought_equates_rulers_and_commoners": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "IdeologicalThoughtEquatesRulersAndCommoners",
                      "default": "IdeologicalThoughtEquatesRulersAndCommoners"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "IdeologicalThoughtEquatesRulersAndCommoners",
                    "default": "IdeologicalThoughtEquatesRulersAndCommoners"
                  }
                }
              }
            },
            "ideology_reinforces_prosociality": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "IdeologyReinforcesProsociality",
                      "default": "IdeologyReinforcesProsociality"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "IdeologyReinforcesProsociality",
                    "default": "IdeologyReinforcesProsociality"
                  }
                }
              }
            },
            "production_of_public_goods": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "@oneOf": {
                      "title": "@oneOf",
                      "type": "object",
                      "description": "Choose from the list ...",
                      "oneOf": [
                        {
                          "properties": {
                            "lorem": {
                              "type": "string"
                            }
                          }
                        },
                        {
                          "properties": {
                            "ipsum": {
                              "type": "string"
                            }
                          }
                        }
                      ]
                    },
                    "@type": {
                      "type": "string",
                      "title": "ProductionOfPublicGoods",
                      "default": "ProductionOfPublicGoods"
                    }
                  }
                }
              ],
              "additionalItems": {
                "type": "object",
                "properties": {
                  "@oneOf": {
                    "title": "@oneOf",
                    "type": "object",
                    "description": "Choose from the list ...",
                    "oneOf": [
                      {
                        "properties": {
                          "lorem": {
                            "type": "string"
                          }
                        }
                      },
                      {
                        "properties": {
                          "ipsum": {
                            "type": "string"
                          }
                        }
                      }
                    ]
                  },
                  "@type": {
                    "type": "string",
                    "title": "ProductionOfPublicGoods",
                    "default": "ProductionOfPublicGoods"
                  }
                }
              }
            },
            "@type": {
              "type": "string",
              "title": "NormativeIdeologicalAspectsOfEquityAndProsociality",
              "default": "NormativeIdeologicalAspectsOfEquityAndProsociality"
            }
          }
        },
        "ra": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "@oneOf": {
                  "title": "@oneOf",
                  "type": "object",
                  "description": "Choose from the list ...",
                  "oneOf": [
                    {
                      "properties": {
                        "lorem": {
                          "type": "string"
                        }
                      }
                    },
                    {
                      "properties": {
                        "ipsum": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                },
                "@type": {
                  "type": "string",
                  "title": "Ra",
                  "default": "Ra"
                }
              }
            }
          ],
          "additionalItems": {
            "type": "object",
            "properties": {
              "@oneOf": {
                "title": "@oneOf",
                "type": "object",
                "description": "Choose from the list ...",
                "oneOf": [
                  {
                    "properties": {
                      "lorem": {
                        "type": "string"
                      }
                    }
                  },
                  {
                    "properties": {
                      "ipsum": {
                        "type": "string"
                      }
                    }
                  }
                ]
              },
              "@type": {
                "type": "string",
                "title": "Ra",
                "default": "Ra"
              }
            }
          }
        },
        "@type": {
          "type": "string",
          "title": "ReligionAndNormativeIdeology",
          "default": "ReligionAndNormativeIdeology"
        }
      }
    }
    },
    "required": [],
    "dependencies": {},
    "definitions": {}
    }

ReactDOM.render((

), document.getElementById("app"));```

Expected behavior Form to render within seconds ...

Actual behavior Form takes minimum 45 seconds to 2 minutes to load and webpage gets stuck/ frozen

Version @rjsf/core": "^3.2.0

KittyJose commented 2 years ago

I had to cut my schema a bit, coz i hit maximum limit. But i can send you the entire schema (if required). This problem prevails for any of and one of.

Sakthivelgovindan commented 2 years ago

I'm also facing the same issue @KittyJose

KittyJose commented 2 years ago

@Sakthivelgovindan This was fixed in the recent updates - perhaps check if the versions are same? "react-jsonschema-form": "^1.8.1",

stale[bot] commented 9 months ago

This issue has been automatically marked as possibly close because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

stale[bot] commented 8 months ago

This issue was closed because of lack of recent activity. Reopen if you still need assistance.