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.

Comments

NickWilde created an issue. See original summary.

nickdickinsonwilde’s picture

Status: Active » Needs review
StatusFileSize
new1.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

Assigned: Unassigned » Munavijayalakshmi
Status: Needs work » Needs review
StatusFileSize
new1.15 KB
Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
andrtroe’s picture

Assigned: Unassigned » andrtroe
andrtroe’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: andrtroe » Unassigned