Problem/Motivation
PatternPreset::getGroup() resolves the group from the root source when the preset has none, then calls $this->save(). A preset whose source has no group is saved on every read. PresetLibraryPanel reads it twice per preset and PatternPresetListBuilder once per row, so every render of the preset library or the preset list writes config.
Proposed resolution
Resolve the group without saving, and store it from preSave(), skipped during a config sync, so a preset saved again keeps it. Kernel test counting saves with the EntitySaveCounter of display_builder_test.
Found while reviewing #3624396: Plan: Harden InstanceInterface, IslandInterface and DisplayBuildableInterface as public API before RC1.
Issue fork display_builder-3626661
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mogtofu33 commented