Book selection form can load thousands of nodes (turn to autocomplete)
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3187277. --> Reported by: [tstoeckler](https://www.drupal.org/user/107158) Related to !159 !78 !114 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>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.</p> <p>Since <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/drupal/issues/3040181" title="Status: Closed (fixed)">#3040181: Unpublished books appear in the list of books at /book</a></span> 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.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Enable Book module</li> <li>Create a few thousand books</li> <li>Attempt to load the form to a book-enabled node</li> </ol> <p>Expected result: The form loads in a normal amount of time<br> Actual result: The form takes incredibly long to load</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>?</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Agree on a solution.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>?</p> <h3 id="summary-api-changes">API changes</h3> <p>?</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>?</p> <h3 id="summary-release-notes">Release notes snippet</h3> <p>-</p> > Related issue: [Issue #3040181](https://www.drupal.org/node/3040181) > Related issue: [Issue #502430](https://www.drupal.org/node/502430) > Related issue: [Issue #3551582](https://www.drupal.org/node/3551582)
issue