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.
Comment | File | Size | Author |
---|---|---|---|
#6 | Menu_Items_should-2853074-6.patch | 1.15 KB | Munavijayalakshmi |
#2 | menu-items-should-2853074-1.patch | 1.09 KB | NickDickinsonWilde |
Comments
Comment #2
NickDickinsonWildeComment #4
NickDickinsonWildegrumble someone was a numbskull and did a whole ton of patches dependent on his earlier standards fixing patch :(
Comment #5
NickDickinsonWilde(not in functionality but just to apply due to line changes)
Comment #6
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #7
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #8
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedComment #9
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedThis issue is now in conflict with this one https://www.drupal.org/project/taxonomy_menu/issues/2630074
Comment #10
dstolNeeds to be re-rolled against the latest 8.x-3.x
Comment #11
DamienMcKennaWe should also add test coverage to make sure it continues to work as expected.
Comment #12
DamienMcKenna