Jump to content

Presta 1.4 Slow Loading 2-3 secs... Bottleneck found


Recommended Posts

Hi Guys

 

I've tried to use Firebug (Net) and realize that browser waited about 2-3secs before it is render by the browser...

 

Therefore i went into my shell account and did a

 

time php category.php

 

indeed the PHP 'compiling' is slow...

 

All the Cache and CCC has been set to enabled, it should be compiling fast...

 

However... i further investigate using PHP xdebug

 

0.4507 16158064 -> is_array() /home/test/domains/test.com/public_html/beta/classes/Configuration.php:118

0.4507 16158064 -> key_exists() /home/test/domains/test.com/public_html/beta/classes/Configuration.php:118

0.4507 16131408 -> md5() /home/test/domains/test.com/public_html/beta/modules/paypal/paypal.php:63

0.4507 16131432 -> file_get_contents() /home/test/domains/test.com/public_html/beta/modules/paypal/paypal.php:62

2.3615 16131568 -> array_key_exists() /home/test/domains/test.com/public_html/beta/classes/Module.php:961

2.3615 16131880 -> is_callable() /home/test/domains/test.com/public_html/beta/classes/Module.php:709

2.3616 16131976 -> call_user_func() /home/test/domains/test.com/public_html/beta/classes/Module.php:713

2.3616 16132296 -> PayPal->hookRightColumn() /home/test/domains/test.com/public_html/beta/classes/Module.php:713

2.3616 16132976 -> CookieCore->__get() /home/test/domains/test.com/public_html/beta/classes/Cookie.php:230

 

 

The paypal line 62 is creating huge bottleneck... it took about 2 second to load that line

 

//$content = @file_get_contents('https://www.prestashop.com/partner/preactivation/preactivation-warnings.php?version=1.0&partner=paypal&iso_country='.Tools::strtolower(Country::getIsoById(Configuration::get('PS_COUNTRY_DEFAULT'))).'&iso_lang='.Tools::strtolower(Language::getIsoById(intval($cookie->id_lang))).'&id_lang='.(int)$cookie->id_lang.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $context);

 

 

I commented it and the site compile in miliseconds now...

 

 

My question is...

 

What's the paypal preactivation all about? Is it useful?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...