Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
_comment_get_comment_fields() is weird, super costly and unused
- weird: fetches a list of Field config entities, and force-adds a ->bundles property on them - doesn't seem kosher
- super costly: entity_load_multiple_by_properties('field_entity') means loading all field definitions,
then *for each resulting field*, entity_load_multiple_by_properties('field_instance') means loading all instance definitions.
- unused: it's never called currently ? Plus, its phpdoc mentions it as a "maintenance mode" replacement for comment_get_comment_fields(), which itself doesn't exist...
Comment | File | Size | Author |
---|---|---|---|
#1 | comment_get_comment_fields-2143589-1.patch | 1.13 KB | yched |
Comments
Comment #1
yched CreditAttribution: yched commentedLet's see what breaks if we remove it ?
Comment #2
yched CreditAttribution: yched commentedComment #3
longwaveLooked at the commit where this was first introduced, it wasn't called then either, so seems like this can be safely removed.
Comment #4
larowlanYeah it was moved to the manager.
We should look at the performance of that too.
Comment #5
andypostNice catch! Implementation in manager is ok
Comment #6
catchCommitted/pushed to 8.x, thanks!