Site Optimization Problems

I am running Multi-Vendor version 2.2.4 and noticed that the cart seems sluggish and slow. I installed siteoptimizer and that seem to improve my load speeds on most pages. I am still noticing that some pages are still sluggish. I think that the shipping calculator is making these pages sluggish!



Here are my problems:

  1. I am still have a really slow load time when the customer click on “view cart”. I think this is related to the shipping estimator script. The load time on this page improves when I disable the shipping calculator on this page. Does anyone know how to fix this?


  2. The shipping estimator itself is really slow when calculating realtime shipping rates. I know that there is a documented problem about this. I tried to fix the problem using the solution that was posted on the forum. This did not work in my case. Does anyone know how to fix this?


  3. I was looking at the local.config.php file and noticed the following parameters:

    [indent=1]// Tweaks

    $config['tweaks'] = array (

    'js_compression' => false, // enables compession to reduce size of javascript files

    'check_templates' => true, // disables templates checking to improve template engine speed

    'inline_compilation' => true, // compiles nested templates in one file

    'anti_csrf' => false, // protect forms from CSRF attacks

    'disable_block_cache' => false, // used to disable block cache

    'join_css' => false, // is used to unite css files into one file

    'allow_php_in_templates' => false, // Allow to use {php} tags in templates[/indent]



    [indent=1]What do these parameters do? Do you recommend changing them?[/indent]


  4. I also noticed that you can change the backend cache parameter in the local.config.php file. Since I have a dedicated server I can change this parameter to what ever I want and make it work. Here is the parameter that I am talking about:

    [indent=1]// Cache backend

    // Available backends: file, sqlite, mysql, shmem

    // To use sqlite cache the “sqlite3” PHP module should be installed

    // To use shmem cache the “shmop” PHP module should be installed

    $config['cache_backend'] = 'file';[/indent]



    [indent=1]Does anyone have any recommendations on what to change this parameter to? I know that CS-Cart says to change it for better optimization. I just want to know if sqlite3 is better than mysql or shmop?[/indent]

There was a bug (actually disabling multi-threading) in the realtime shipping. Contact the helpdesk and they should provide you the fix. Or search the forums for the answer (don't remember off the top of my head other than to remove a 'false' from an if statement).

Here is what CS-Cart's support staff had to say about the local.config.php parameters:



Description of the settings:

  1. js_compression - if this directive is enabled, the whole CS-Cart Javascript code is packed and stored in the var/cache directory of your CS-Cart installation.
  2. check_templates - if this directive is enabled, the templater will check templates for syntax errors.
  3. inline_compilation - if the following setting is enabled, a parser looks for template {include} tags and joins them in one file which is stored in the var/compiled directory of your CS-Cart installation.
  4. anti_csrf - if this setting is enabled, Cross-site request forgery attacks can be prevented. To learn more about them, please check the following article:



    [url=“Cross-site request forgery - Wikipedia”]http://en.wikipedia.org/wiki/Cross-site_request_forgery[/url]


  5. disable_block_cache - if this setting is enabled, block content will not be cached, this may affect the site performance.
  6. join_css - if the following setting is enabled, all CS-Cart CSS files will be joined and stored in the var/cache directory of your CS-Cart installation.
  7. allow_php_in_templates - if this setting is enabled, PHP directives can be processed in template files, this may also affect the site preformance.



    CS-Cart's recommended settings:

    // Tweaks

    $config['tweaks'] = array (

    'js_compression' => true, // enables compession to reduce size of javascript files

    'check_templates' => true, // disables templates checking to improve template engine speed

    'inline_compilation' => true, // compiles nested templates in one file

    'anti_csrf' => false, // protect forms from CSRF attacks

    'disable_block_cache' => false, // used to disable block cache

    'join_css' => true, // is used to unite css files into one file

    'allow_php_in_templates' => false, // Allow to use {php} tags in templates

I'm confused.



[color=#282828][font=arial, verdana, tahoma, sans-serif]2. [/font][/color]check_templates[color=#282828][font=arial, verdana, tahoma, sans-serif] - if this directive is enabled, the templater will check templates for syntax errors.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]'check_templates' => true, // disables templates checking to improve template engine speed[/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]So… in order to NOT check the templates, should it be put on false or true!?[/font][/color]

[quote name='Flow' timestamp='1334084528' post='134610']

I'm confused.



[color=#282828][font=arial, verdana, tahoma, sans-serif]2. [/font][/color]check_templates[color=#282828][font=arial, verdana, tahoma, sans-serif] - if this directive is enabled, the templater will check templates for syntax errors.[/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif]'check_templates' => true, // disables templates checking to improve template engine speed[/font][/color]



[color=#282828][font=arial, verdana, tahoma, sans-serif]So… in order to NOT check the templates, should it be put on false or true!?[/font][/color]

[/quote]



Anyone? I'm guessing “true” does not check templates ?

[quote name='Flow' timestamp='1338993936' post='138149']

Anyone? I'm guessing “true” does not check templates ?

[/quote]

Put it to “false”

check_templates? true = Yes and false = No

[quote name='cscartrocks' timestamp='1338994197' post='138150']

Put it to “false”



check_templates? true = Yes and false = No

[/quote]



Are you sure about that? Because it also says:



[color=#282828][font=arial, verdana, tahoma, sans-serif][size=3]true, // disables templates checking to improve template engine speed[/size][/font][/color]

[color=#282828][font=arial, verdana, tahoma, sans-serif][size=3]So it could be either one![/size][/font][/color]

I'd leave it checking templates. After the template is cached it's irrelevant. So it's a one-time hit. Benefits exceed the costs.