Problem/Motivation
instead of using a StorageComparer as proposed in #3223976: Use StorageComparer in StorageCopyTrait we can just optimise the order of operations in StorageCopyTrait to use less write operations in the stroage. (ie by writing only what changed) Of course this is a tradeoff because it involves reading everything, but often that is faster.
Steps to reproduce
see #3217783: Configuration management performance regression - slow config:import
Proposed resolution
Do not delete all before writing everything again and instead delete only what needs to be deteled and write only what changed.
Remaining tasks
patch review merge party
User interface changes
none
API changes
none
Data model changes
none
Release notes snippet
tbd
Issue fork drupal-3232494
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 #3
bircherI pushed the patch from #3217783-9: Configuration management performance regression - slow config:import (only code changes to the trait) but I think it will fail tests because it doesn't delete collections that it should.
I improved it a bit.
Comment #4
birchercommit credits for b45963512bfd5c33944fe45d2eae6f7a04c6c282 (for some reason not shown here, check the MR) of course belong to NigelCunningham.
my contribution is in its own commit
Also I tagged this issue as a bug because #3217783: Configuration management performance regression - slow config:import is marked as a bug.
Comment #6
alexpottCrediting @NigelCunningham since this was their idea on #3217783: Configuration management performance regression - slow config:import
Comment #7
alexpottThis looks great.
Comment #8
nigelcunningham commentedLooks good to me, too. Thanks for the credit.
Comment #12
catchCommitted/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
Comment #14
bircherI created a change record for this because it broke tests in config filter.
#3272264: Drupal 9.4 changes to StorageCopyTrait break assumptions in Config Filter