Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    47
    Plugin Contributions
    0

    Default Checking - Disabling function zen_get_products_special_price to improve performance

    I am working to improve performance (without changing hosts) - by reducing the number of queries performed... So I looked into the query logs to see what was happening.

    I have determined that I could return immediately from
    function zen_get_products_special_price
    without doing any of the operations since we don't have any specials/sales, there is no need to do the work to determine such. This then reduces our query counts by over 50%.
    And function attributes_weight helps a bit more.
    includes/classes/shopping_cart.php
    admin/includes/functions/function_prices.php
    includes/classes/shopping_cart.php

    Those of you that have spent more time in the code (I have only been looking at this for a week or two) might have an opinion or three that this is a good/bad idea. We don't need Specials/Sales and it seems to work on my testing...
    I don't think this is breaking anything else... or is it?...

    /includes/functions/function_prices.php
    ~~line~~#13 (1.3.7 #25 (1.3.8a
    admin/includes/functions/function_prices.php
    ~~line~~#24

    Code:
    //get specials price or sale price
      function  zen_get_products_special_price($product_id, $specials_price_only=false) {
    //   Kevin added - and return false for no special prices   
           return false;
    //  Kevin end of added 
        global $db;
    ....
    ========================


    I also thought to disable attribute weight checks to help a bit more - as there is no shipping by weight...

    includes/classes/shopping_cart.php
    ~~line~~#1007 (1.3.7 #2013 (1.3.8a

    Code:
      function attributes_weight($products_id) {
     global $db;
      
         $attribute_weight = 0;
    //  Kevin add - return 0 attribute  weight
        return $attribute_weight;
    //  Kevin end add
        if  (isset($this->contents[$products_id]['attributes'])) {
    ....
    =======================================

    If specials/sales are needed then we will take a different strategy - but for now - thoughts? Things missing?..

    Thanks...

    KevinW
    =====

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,018
    Plugin Contributions
    61

    Default Re: Checking - Disabling function zen_get_products_special_price to improve performan

    Have you looked at this option.....

    Our results from this module have been phenomenal


    http://www.data-diggers.com/query-cache-v1.6-released

    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  3. #3
    Join Date
    Mar 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: Checking - Disabling function zen_get_products_special_price to improve performan

    I will check out and try query cache and report back.. thanks...

 

 

Similar Threads

  1. Host disabling PHPMail function
    By gsh68 in forum General Questions
    Replies: 4
    Last Post: 25 Jul 2011, 12:39 PM
  2. Replies: 1
    Last Post: 13 Jan 2009, 12:05 PM
  3. How to improve performance of Zen Cart v1.3.X up to 25%
    By data_digger in forum General Questions
    Replies: 9
    Last Post: 8 Jan 2009, 09:43 PM
  4. Trying to Improve Performance
    By HOBOcs in forum Basic Configuration
    Replies: 18
    Last Post: 17 Jan 2008, 10:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR