Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Instead of loading each local task route object manually it would be possible to just load all of them parallel.
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff.txt | 831 bytes | dawehner |
#9 | local_task-2032311-9.patch | 1.25 KB | dawehner |
#6 | local_task-2032311-6.patch | 1.21 KB | dawehner |
#4 | local_task-2032311-4.patch | 1.27 KB | dawehner |
#1 | local_task-2032311-1.patch | 1.19 KB | dawehner |
Comments
Comment #1
dawehnerThis should hopefully work.
Comment #2
Crell CreditAttribution: Crell commentedThis seems like a reasonable performance optimization.
Comment #4
dawehnerComment #5
pwolanin CreditAttribution: pwolanin commentedso, it looks like in the current implementation this would eliminate potentially several DB queries, at the cost of an extra foreach loop, which seems liek a reasonable tradeoff.
I might prefer a ternary instead of if/else here:
Comment #6
dawehnerThere we go.
Comment #7
tim.plunkettLooks good to me! Thanks @dawehner.
Comment #8
alexpottPerhaps rather than the enjoyably flowery language of a "bunch of routes" we should change this to
// Prefetch routes.
... if we need a comment at all :)
Comment #9
dawehnerThere we go.
Comment #10
jibranBack to RTBC
Comment #11
alexpottCommitted 2f0e07f and pushed to 8.x. Thanks!