Book selection form can load thousands of nodes

Created on 8 December 2020, over 3 years ago
Updated 26 April 2024, about 2 months ago

Problem/Motivation

When editing a child page of a book, it is possible to move it to another book. For this purpose, Drupal renders a select element with all (root-level) book nodes (that the user can access) as options. As it is possible to have thousands of books on a site this is not only very bad usability but can also be detrimental for performance.

Since #3040181: Unpublished books appear in the list of books at /book β†’ the performance impact of this has greatly increased (i.e. gotten (much) worse), as with this not only will (possibly) thousands of books be loaded, but a runtime access check will be performed for each one of them.

Steps to reproduce

  1. Enable Book module
  2. Create a few thousand books
  3. Attempt to load the form to a book-enabled node

Expected result: The form loads in a normal amount of time
Actual result: The form takes incredibly long to load

Proposed resolution

?

Remaining tasks

Agree on a solution.

User interface changes

?

API changes

?

Data model changes

?

Release notes snippet

-

πŸ› Bug report
Status

Needs work

Version

1.0

Component
BookΒ  β†’

Last updated 33 minutes ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @pwolanin
Created by

πŸ‡©πŸ‡ͺGermany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024