Better batch support

Created on 25 August 2025, about 1 month ago

Problem/Motivation

The scanner module currently uses "batch" functionality to break up large operations into smaller parts. This helps with both resource usage on the server, and also timeout issues.

The problem: The module currently creates batches based on fields, not entities (eg. paragraphs or nodes). This means that if there are 300 nodes that all need the same field changed, your site will try to convert all 300 nodes at once, and not actually use the batch function.

Steps to reproduce

  1. Start a fresh Drupal site
  2. Create many paragraphs on many nodes (over 300)
  3. Install & activate the scanner module
  4. Search & replace on all paragraphs on all nodes
  5. Get a server 504 error (timeout)

Proposed resolution

Introduce a batch process for each paragraph or node. See patch.

Remaining tasks

The existing patch only handles paragraphs; need a second patch to support nodes as well.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States koppie

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

Comments & Activities

Production build 0.71.5 2024