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

Command icon 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

bircher created an issue. See original summary.

bircher’s picture

Status: Active » Needs review

I 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.

bircher’s picture

commit 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.

alexpott’s picture

Crediting @NigelCunningham since this was their idea on #3217783: Configuration management performance regression - slow config:import

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

This looks great.

nigelcunningham’s picture

Looks good to me, too. Thanks for the credit.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

  • catch committed 8371083 on 10.0.x
    Issue #3232494 by bircher, NigelCunningham, alexpott: Optimise...

  • catch committed 2855e44 on 9.4.x
    Issue #3232494 by bircher, NigelCunningham, alexpott: Optimise...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

bircher’s picture