Big splits with patching enabled have terrible performance

Created on 15 February 2024, 4 months ago

Problem/Motivation

After going from 1.x to the 2.x version exporting our 'excluded' config split took 1 minute 20 seconds where in 1.x it took about 5 seconds.

After some debugging and digging it turns out that the 'excluded' config split (which is quite small) wasn't the culprit but our 'shared' split which contains ~1200 config files was to blame.

The reason that split A caused split B to be slow is due to \Drupal\config_split\EventSubscriber\SplitImportExportSubscriber::importDefaultPriority going through all splits when exporting.

Setting no_patching to true on the big split fixed this.

Not sure if there is anything to be done here, but wanted to document this at the very least so if others run into this they might save some time.

Steps to reproduce

Have some really big splits with no_patching: false and try to export a split.

Proposed resolution

TBD

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Lendude
  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    oh wow, from a few seconds to minutes is quite bad. I don't know off the top of my head if the patch creation could be that significantly optimised.

    I would assume that it is always going to be slower than not patching. So we could add a message to the checkbox saying that for large splits this makes a difference.

Production build 0.69.0 2024