Problem/Motivation

In #3547119: Add a command to export all content of a particular entity type, with optional filtering by bundle, just before commit, @alexpott observed that ContentExportCommand::loadEntities() could be refactored to use loadByProperties() to take advantage of multiple entity loading.

Let's do that. See https://git.drupalcode.org/project/drupal/-/merge_requests/13309#note_61... for implementation hint.

Issue fork drupal-3554978

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

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Status: Active » Needs review
thejimbirch’s picture

Status: Needs review » Reviewed & tested by the community

Suggestion from the previous issue implemented. It makes it a lot easier to read. Tests pass. Marking as RTBC

alexpott’s picture

Issue summary: View changes

Single entity loading received improvements from fibers... entity static caching has had improvements... which should prevent this from eating all the memory...

The current implementation is probably better for exporting millions of nodes... but I'd argue that handling that case is out-of-scope. And besides we could do a count and then batch if we want.

  • alexpott committed 20b6597c on 11.3.x
    Issue #3554978 by phenaproxima, alexpott: ContentExportCommand::...

  • alexpott committed ea75fec9 on 11.x
    Issue #3554978 by phenaproxima, alexpott: ContentExportCommand::...
alexpott’s picture

Version: 11.x-dev » 11.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed ea75fec9563 to 11.x and 20b6597cda4 to 11.3.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.