Problem/Motivation

Batch::claimItem() contains a problem similar to #3124304: DatabaseQueue::claimItem() is inefficient with huge data.

The SQL query is extremely slow if:

  • There are dozens of rows with the same name.
  • The serialized data in the data field is large (~1 MB in our use case).

We noticed this when uploading a lot of images with the media_bulk_upload module.

Steps to reproduce

Proposed resolution

The solution proposed in #3124304: DatabaseQueue::claimItem() is inefficient with huge data would also work here: first fetch only the item ID, then fetch the data in a separate query.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3611331

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

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review
smustgrave’s picture

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)

Thoughts on #4