Skip to content

jsonforms-renderers: reduce per-keystroke AJV cost in useIsRequired for conditional schemas #116

Open

Description

@ginaxu1

Problem

When the root schema uses conditional constructs (allOf / if / then, etc.), every visible control that is not statically required still deep-clones form data and runs a full AJV validation inside useIsRequired on each keystroke. On large forms, especially when file or spreadsheet payloads live in data, that can get expensive.

The root-only fast path in #112 helps schemas without conditionals, but not the forms that need the AJV-backed asterisk.

Proposed work

  1. Profile a representative form that uses root-level conditionals and stores moderately large values in data.
  2. If the cost shows up, consider sharing one "required set" computation per data snapshot across controls (or another cache keyed by data + schema) instead of N clone+validate calls.

Context

Follow-up from review on #112. Non-blocking until measured.

Activity

  1. self-assigned this
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions