Reduce DB calls of \Drupal\facets\Plugin\facets\hierarchy\Taxonomy

Created on 18 September 2019, almost 5 years ago
Updated 10 April 2024, 5 months ago

Problem/Motivation

While using the taxonomy facet hierarchy plugin with large vocabularies, building facets generates a huge amount of database queries. The thing is that \Drupal\taxonomy\TermStorage::loadChildren() generates at least one request per call and is never cached.

Proposed resolution

Do not rely on \Drupal\taxonomy\TermStorage::loadChildren() to build the hierarchy but on \Drupal\taxonomy\TermStorage::loadTree() instead.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡«πŸ‡·France DuaelFr Montpellier, France

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