Issue#3370223: Do not store language mapping as entity returns all the fields,...
Issue#3370223: Do not store language mapping as entity returns all the fields, including all translations variations (this could be further optimized)
Related to #3370223
While the changes in MR 37 makes good improvements, I found that on large sites it doesn't fully address all performance issues, particularly with cache invalidation and static caching. I added some suggested additional optimizations in a new MR:
- Utilizes Drupal's cache tag system more effectively, ensuring proper invalidation without explicit cache clearing.
- Implements a 12-hour TTL instead of permanent caching to prevent cache bloat.
- Recursively collects entity IDs from all menu levels, reducing the number of database queries.
- Implements static caching for processed trees, preventing redundant processing.
- Preserves and enhances cache metadata, (crucial for proper cache invalidation and variation)
- Optimizations result in fewer database queries, particularly for deep menu structures of 1000+ links