Use drupal_static() for site_verify_load().

Created on 16 December 2014, almost 10 years ago
Updated 4 November 2024, 30 days ago

site_verify_load() gets called multiple times and it performs a db_query each time. We could get a minor performance improvement by making use of drupal_static().

Format patch attached.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

    • elc committed 18767786 on 7.x-1.x
      [#2394355] by gabesullice, chris matthews: Use static cache for...
  • 🇦🇺Australia elc

    The caching is only relevant to an admin loading the edit verification page, when there are 4x calls caused by the automatic menu item loading. All other calls to the function are single.

    Using a non drupal_static method as the drupal_static call is expensive in comparison to a local static, especially when there is no possibility of a static cache reset being effective.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024