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.
views_get_applicable_views() calls views_get_all_views(TRUE) -- there is no reason to reset all the time. Doing htis unnecessarily flushes a lot of caches and causes a great deal of unnecessary extra loading on every page load.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1342580.patch | 434 bytes | k4v |
Comments
Comment #1
k4v CreditAttribution: k4v commentedI removed the parameter TRUE
Comment #2
k4v CreditAttribution: k4v commentedComment #3
dawehnerThis patch looks fine! Committed to 7.x-3.x
Comment #4
k4v CreditAttribution: k4v commentedComment #6
David_Rothstein CreditAttribution: David_Rothstein commentedThis caused a regression in #1280382: Enabling disabled views presents a path to the new view which leads to 404, so I went ahead and reopened that issue.
Based on the discussion there, the performance impact of this was thought to have been negligible, as it seemed like views_get_applicable_views() is called rarely... Was that a mistake? At first glance, I'm not seeing how there is a performance hit on every page load from this, but I could be missing something.