You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that in the code snippet above, the PackageService class is instantiated multiple times by $this->getPackageConfig() method calls, which can impact performance.
To optimize this, we can implement two approaches:
Approach 1
Retrieve the config array once and use its values directly:
md_security_header_extended/controllers/single_page/dashboard/system/environment/security_header_extended.php
Lines 11 to 26 in cecfc9d
I noticed that in the code snippet above, the
PackageService
class is instantiated multiple times by$this->getPackageConfig()
method calls, which can impact performance.To optimize this, we can implement two approaches:
Approach 1
Retrieve the config array once and use its values directly:
Approach 2
Introduce a new property to cache the package config and reuse it:
Implementing either of these approaches can help optimize performance by reducing redundant calls to
$this->getPackageConfig()
.The text was updated successfully, but these errors were encountered: