nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
162 stars 68 forks source link

Poor performance showing up the in debug bar #1480

Closed bartdigitalpulse closed 3 weeks ago

bartdigitalpulse commented 4 weeks ago

Question

I'm noticing that with some of our projects Seomatic takes up a lot of ms to load. Using the debug bar I see:

LIVE:

nystudio107\seomatic\services\MetaContainers::loadMetaContainers 119.7 ms / 9.52 MB
nystudio107\seomatic\helpers\DynamicMeta::addDynamicMetaToContainers 99.9 ms / 9.52 MB
nystudio107\seomatic\helpers\DynamicMeta::addMetaLinkHrefLang 92.5 ms / 9.52 MB
nystudio107\seomatic\helpers\DynamicMeta::getLocalizedUrls 92.4 ms / 9.52 MB

LOCAL (devmode enabled/disabled same results). < 30 sec refresh no difference.

nystudio107\seomatic\services\MetaContainers::loadMetaContainers 253.2 ms / 9.63 MB
nystudio107\seomatic\helpers\DynamicMeta::addDynamicMetaToContainers 200.6 ms / 9.63 MB
nystudio107\seomatic\helpers\DynamicMeta::addMetaLinkHrefLang 166.2 ms / 9.63 MB
nystudio107\seomatic\helpers\DynamicMeta::getLocalizedUrls 166.0 ms / 9.62 MB

This on the frontend home page. No custom config options set. No adjustments in the templates. Any suggestions? Feels like I'm being tricked by the debug bar.

Additional context

Craft version: Craft Pro 3.9.13 Seomatic version: 3.4.77 PHP version: 8.2.19 Apache Mysql 8.0

7zYHjYlDfn

khalwat commented 3 weeks ago

Yes, if SEOmatic's debug panel is active, it will be slower than normal. You can disable it in SEOmatic -> Plugin Settings -> Advanced -> SEOmatic Debug Toolbar Panel and then do your performance timings.