Currently on cache clear/update/menu creation, a description and title is generated with $term->getDescription()/label() in Drupal\taxonomy_menu\entity\TaxonomyMenu.
Then in Drupal\taxonomy_menu\Plugin\Menu\TaxonomyMenuMenuLink, the term is loaded 2x more and the description/label is recreated.
This is bad in a couple ways:
1. Performance: yes Drupal smartly caches loaded entities, but call load() extra times still adds unnecessary overhead - this patch saves 2 term load events per term every cache refresh or menu update.
2. Any changes in TaxonomyMenu aren't respected.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

NickWilde created an issue. See original summary.

NickDickinsonWilde’s picture

Status: Active » Needs review
FileSize
1.09 KB

Status: Needs review » Needs work

The last submitted patch, 2: menu-items-should-2853074-1.patch, failed testing.

NickDickinsonWilde’s picture

grumble someone was a numbskull and did a whole ton of patches dependent on his earlier standards fixing patch :(

NickDickinsonWilde’s picture

(not in functionality but just to apply due to line changes)

Munavijayalakshmi’s picture

Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
andrey.troeglazov’s picture

Assigned: Unassigned » andrey.troeglazov
andrey.troeglazov’s picture

This issue is now in conflict with this one https://www.drupal.org/project/taxonomy_menu/issues/2630074

dstol’s picture

Status: Needs review » Needs work

Needs to be re-rolled against the latest 8.x-3.x

DamienMcKenna’s picture

Issue tags: +Needs tests

We should also add test coverage to make sure it continues to work as expected.

DamienMcKenna’s picture

Assigned: andrey.troeglazov » Unassigned