ding Posted September 13, 2010 Share Posted September 13, 2010 my site is http://www.timeshops.netMy server is Dedicated server,10GB Bandwidth per month. I have set smarty like this,but my site is still very slow,always keep cpu usage at 100%smarty.config.inc.php$smarty->caching = false;$smarty->force_compile = false;Smarty.class.phpvar $compile_check = false;var $force_compile = false;var $caching = 1;Any ideas how I can improve it would be appreciatedThanks! Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 Any help,Thanks Link to comment Share on other sites More sharing options...
jhnstcks Posted September 13, 2010 Share Posted September 13, 2010 You have cache turned off in one file then turned on in the other.Try Rocky's tips here http://www.nethercottconstructions.com/content/1-performance-tips Link to comment Share on other sites More sharing options...
Hedrad Posted September 13, 2010 Share Posted September 13, 2010 Hello,(Sorry for my poor english)I made a test :http://www.webpagetest.org/result/100913_4TXH/25 seconds for flags in google traduction block ! pffffiou...You've got a big problem...I can't identify this.So, I can purpose an alternative :Generate an .htaccess and use URL rewriting.Upgrade manually your .htaccess(example : http://code.google.com/p/molokoloco-coding-project/wiki/HtAccess )So, if you use elements in cache, for the second connection, time will be better.It's not suffisant, you must find the real problem.Good luck. Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 You have cache turned off in one file then turned on in the other.Try Rocky's tips here http://www.nethercottconstructions.com/content/1-performance-tips Thanks jhnstcks, i have try rocky's tips,but still very slow. Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 Hello,(Sorry for my poor english)I made a test :http://www.webpagetest.org/result/100913_4TXH/25 seconds for flags in google traduction block ! pffffiou...You've got a big problem...I can't identify this.So, I can purpose an alternative :Generate an .htaccess and use URL rewriting.Upgrade manually your .htaccess(example : http://code.google.com/p/molokoloco-coding-project/wiki/HtAccess )So, if you use elements in cache, for the second connection, time will be better.It's not suffisant, you must find the real problem.Good luck. hi,Hedrad. Thanks for your help.I think it is ps's query problem.Once i only add a little products ,the site is very quick.but now my products are over 6000,my site becomes more slowly Link to comment Share on other sites More sharing options...
tomerg3 Posted September 13, 2010 Share Posted September 13, 2010 Can you be more specific about what is slow (Search function, homepage, any page)?Can you provide a link to your site so we can see what is slow? Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 hi,tomerg3,thanksActually all page is slow, especially of products list pagesuch as http://timeshops.net/category.php?id_category=19 Link to comment Share on other sites More sharing options...
tomerg3 Posted September 13, 2010 Share Posted September 13, 2010 Is it any faster if you disable the category block? Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 hi,tomerg3,i have removed category block,It seems does not work. Link to comment Share on other sites More sharing options...
tomerg3 Posted September 13, 2010 Share Posted September 13, 2010 it seems very very slow, can you check the slow query logs on your server, they are usually at /www/mysql_slow_queries Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 hi,tomerg3really thanks for your helpbut i do not find mysql_slow_queries on my server, my server uses Microsoft 2003 Link to comment Share on other sites More sharing options...
ding Posted September 13, 2010 Author Share Posted September 13, 2010 I think it is caused by this sql, i use MySQLAdmin to test and find that ps excutes the sql below takes a long time/classes/categories.phppublic function getProducts($id_lang, $p, $n, $orderBy = NULL, $orderWay = NULL, $getTotal = false, $active = true, $random = false, $randomNumberProducts = 1 ) $sql = ' SELECT p.*, pa.`id_product_attribute`, pl.`description`, pl.`description_short`, pl.`available_now`, pl.`available_later`, pl.`link_rewrite`, pl.`meta_description`, pl.`meta_keywords`, pl.`meta_title`, pl.`name`, i.`id_image`, il.`legend`, m.`name` AS manufacturer_name, tl.`name` AS tax_name, t.`rate`, cl.`name` AS category_default, DATEDIFF(p.`date_add`, DATE_SUB(NOW(), INTERVAL '.(Validate::isUnsignedInt(Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) ? Configuration::get('PS_NB_DAYS_NEW_PRODUCT') : 20).' DAY)) > 0 AS new, (p.price - IF((DATEDIFF(reduction_from, CURDATE()) <= 0 AND DATEDIFF(reduction_to, CURDATE()) >=0) OR reduction_from = reduction_to, IFNULL(reduction_price, (p.price * reduction_percent / 100)),0)) AS orderprice FROM `'._DB_PREFIX_.'category_product` cp LEFT JOIN `'._DB_PREFIX_.'product` p ON p.`id_product` = cp.`id_product` LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON (p.`id_product` = pa.`id_product` AND default_on = 1) LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (p.`id_category_default` = cl.`id_category` AND cl.`id_lang` = '.intval($id_lang).') LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.intval($id_lang).') JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product` AND i.`cover` = 1) JOIN `'._DB_PREFIX_.'image_lang` il ON (i.`id_image` = il.`id_image` AND il.`id_lang` = '.intval($id_lang).') LEFT JOIN `'._DB_PREFIX_.'tax` t ON t.`id_tax` = p.`id_tax` LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (t.`id_tax` = tl.`id_tax` AND tl.`id_lang` = '.intval($id_lang).') LEFT JOIN `'._DB_PREFIX_.'manufacturer` m ON m.`id_manufacturer` = p.`id_manufacturer` WHERE cp.`id_category` = '.intval($this->id).($active ? ' AND p.`active` = 1' : '').' '.($id_supplier ? 'AND p.id_supplier = '.$id_supplier : ''); Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now