Problem/Motivation
The problem is already very eloquently explained in #3217783: Configuration management performance regression - slow config:import.
Most config imports and most config exports (at least during development) change relatively little amount of config relative to the total amount of config on a site. So to always wipe the transformation storage is not the most efficient.
Steps to reproduce
Open the config import page or run drush config:status
Proposed resolution
Make the StorageCopyTrait smarter by using the StorageComparer when it makes sense.
A new method is added to the trait to override the mechanism choice.
Remaining tasks
Find out the best criteria for when to use the StorageComparer.
User interface changes
none
API changes
A new method on the StorageCopyTrait which can be overwritten to decide when to use the StorageComparer.
Data model changes
none
Release notes snippet
StorageCopyTrait uses StorageComparer to improve performance in some cases.
Issue fork drupal-3223976
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
bircherComment #4
bircherWe should also credit @tstoeckler since the code for updating with the StorageComparer was inspired by his modules tests.
Comment #6
bircherI think this is probably over engineering things. #3232494: Optimise StorageCopyTrait for slow write operations already makes sure not to change more than necessary.