Skip to content

[6.x] Don't rebuild Bard editors when the content hasn't changed - #15700

Merged
jasonvarga merged 1 commit into
statamic:6.xfrom
o1y:bard-value-comparison-perf
Oct 22, 2026
Merged

jasonvarga merged 1 commit into
statamic:6.xfrom
o1y:bard-value-comparison-perf

Conversation

@o1y

@o1y o1y commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Pressing Enter in a long Bard with nested Bards in its sets felt laggy, and the Add Set button showed up late.

2026-10-22 11 51 10

Solution

The cause: whenever the parent updated, every nested Bard threw away its content and rebuilt it. The check that decides whether to rebuild compared JSON strings and saved content often leaves out default attributes that the editor always writes out. So the strings never matched even when nothing had changed

Now it compares the parsed documents, so nested editors only rebuild when their content really changed. Enter is noticeably faster, though it still takes a moment on pages with lots of sets.

@o1y o1y changed the title [6.x] Stop nested Bard fields from rebuilding on every change [6.x] Don't rebuild Bard editors when the content hasn't changed Oct 22, 2026
@jasonvarga
jasonvarga merged commit 8b88491 into statamic:6.x Oct 22, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants