Jump to content

Recommended Posts

Posted

In

ips/system/Output/Output.php::buildMetaTags()

There is this statement 

$rootPath = \IPS\Http\Url::external( \IPS\Settings::i()->base_url )->data['path'];

which is executing for every row in

\IPS\Db::i()->select( '*', 'core_seo_meta' )

Turns out, we have 8000+ rows in core_seo_meta rows in database, so this statement executes 8000 times, causing ~300ms delay in response

It would be better if the statement is moved out of forloop and executed only once.

Posted

Nope. In first it's trying get meta seo data from datastore...

			if ( isset( \IPS\Data\Store::i()->metaTags ) )
			{
				$rows = \IPS\Data\Store::i()->metaTags;
			}
			else
			{
				$rows = iterator_to_array( \IPS\Db::i()->select( '*', 'core_seo_meta' ) );
				\IPS\Data\Store::i()->metaTags = $rows;
			}

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...