Book performance problem in book_node_load

Created on 26 November 2019, almost 5 years ago
Updated 23 July 2023, over 1 year ago

Hi,

i want to start a discussion about the book module and some SQL query that can be really huge.

Step to reproduce :
Use Drupal 8.7 with book module enable.
Add 2000 node content, no need to be allowed book content type.
Create a view on the homepage to display all the 2000.
You will see a SQL query : SELECT * FROM book b where b.nid IN (
)

This request is slow and not really usefull, because we are just looking of the content that can be books.

I would imagine that we can improve this query in 2 differents ways:
- limit to the node that are from the allowed book type (/admin/structure/book/settings)
- limit to the existing book node (/admin/structure/book)

I don't know which is the best option. But in my case i patch the module with the first option.
This is suffisant in my use case.

Past issue (for drupal 7) with the same problem and same solution: https://www.drupal.org/project/drupal/issues/2070807 β†’

πŸ“Œ Task
Status

Postponed

Version

9.5

Component
BookΒ  β†’

Last updated 5 days ago

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

πŸ‡©πŸ‡ͺGermany Tomefa Dresden

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

Merge Requests

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.71.5 2024