At now module each time loads all Site Settings to memory on hook_tokens() (even if we need only one value) via string:
$settings = $site_settings->loadAll();
This is not so good behavior, because site can contain very long list of settings, but in each page we need only small part of them, and spend resources & memory for load a lot of unneeded data, like variables in Drupal 7.x
So will be good to implement loading Site Settings only on demand.
Comments
Comment #2
scott_euser commentedThe idea is to keep it very simple to use in any template without having to do extra work. I'd be happy to accept a patch for a option allowing the editor to turn this behaviour off, but switching it to off by default would be a breaking change for any active sites.
Ie, at https://cgit.drupalcode.org/site_settings/tree/site_settings.module#n70
We could instead put that in a conditional, having it on by default but an option to turn it off here https://cgit.drupalcode.org/site_settings/tree/src/Form/SiteSettingsConf....
Comment #3
scott_euser commentedClosing this for now unless someone wants to offer to add this as a setting in the module configuration page.
Comment #4
anybody