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.
Introduces a static for defined() - saves the cost of defined() itself, and the cost of the function calls. module_implements() becomes about twice as fast internally, and about 1/3 faster inclusive.
Comment | File | Size | Author |
---|---|---|---|
#4 | module_implements.patch | 1.08 KB | catch |
patch.png | 365.77 KB | catch | |
head.png | 383.48 KB | catch | |
module_implements.patch | 977 bytes | catch | |
Comments
Comment #1
catchComment #2
Crell CreditAttribution: Crell commentedI'm trying to think of a case where this would need to be drupal_static() instead of static, and I can't find one. So yay to slightly faster code.
Comment #3
Dries CreditAttribution: Dries commentedLet's add a code comment and resubmit as RTBC.
Comment #4
catchAdded the comment.
Comment #5
webchickCommitted to HEAD. Thanks! :)