vehiclefits / vfmagento

A set of modules for adding vehicle specific features to your Magento shopping cart.
http://vehiclefits.com
Open Software License 3.0
22 stars 18 forks source link

Performance Issue with Vaftire Module #59

Open kylecannon opened 11 years ago

kylecannon commented 11 years ago

Not sure if this was present on 1.35 but on version 2 just having fitments without any tire fitments and only using the year make model program i ran xhprof and without disabling I was getting a total call time of 5,518,485 microseconds.

Doing the following decreased the page view time to 2,711,977 microseconds

VF/Singleton.php

    /**
     * store paramaters in the session
     * @return integer fit_id
     */
    function storeFitInSession()
    {
        $search = $this->flexibleSearch();
        $mapping_id = $search->storeFitInSession();

//        if (file_exists(ELITE_PATH . '/Vaftire')) {
//            $tireSearch = new Elite_Vaftire_Model_FlexibleSearch($search);
//            $tireSearch->storeTireSizeInSession();
//        }
//        if (file_exists(ELITE_PATH . '/Vafwheel')) {
//            $wheelSearch = new Elite_Vafwheel_Model_FlexibleSearch($search);
//            $wheelSearch->storeSizeInSession();
//        }
//        if (file_exists(ELITE_PATH . '/Vafwheeladapter')) {
//            $wheeladapterSearch = new Elite_Vafwheeladapter_Model_FlexibleSearch($search);
//            $wheeladapterSearch->storeAdapterSizeInSession();
//        }
        return $mapping_id;
    }

I narrowed it down to Elite_Vaftire_Model_FlexibleSearch::storeTireSizeInSession taking an extra 2,712,798 microseconds to process the search block. screen shot 2013-09-24 at 12 36 46 pm

screen shot 2013-09-24 at 12 37 00 pm