Generated field migrations very slow because lookup always checks all paragraphs

Created on 10 January 2024, 6 months ago

Problem/Motivation

Generating migration from D7 to D10 with migrate_upgrade β†’ creates migrations that do lookup over all Paragraphs not just the type possible for the relevant field.
For the paragraphs revisions migrations the id is also looked up over all paragraphs.
On systems with many paragraphs types this leads to substantial performance hit during migration.

Proposed resolution

Change the ID lookup in paragraphs revisions from

plugin: paragraphs_lookup
tags:
  - 'Paragraphs Content'
source: item_id

to

plugin: paragraphs_lookup
migration: [the_relevant_main_migration_of_this_paragraphs_revisions]
source: item_id

and
change the lookup in fields referencing paragraphs from checking all paragraphs to only the ones that are allowed types for the field.

πŸ› Bug report
Status

Active

Version

1.16

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024