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
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
Comment #3
prudloff commentedComment #4
smustgrave commentedThink this can be folded into #3124304: DatabaseQueue::claimItem() is inefficient with huge data
Comment #5
smustgrave commentedThoughts on #4