Pursuant Posted September 29, 2008 Share Posted September 29, 2008 I have recently noticed a HORRIBLE lack of performance in the front office, on average around 9 seconds to create my home page ( http://tennieshardware.com ). I have noticed that the back end has an average creation time of about .259 seconds... whats the deal here? Is there anything I can do to increase performance? Link to comment Share on other sites More sharing options...
Damien Metzger Posted September 29, 2008 Share Posted September 29, 2008 Hi,The module "blockcategories" need a fix, you can reduce the maximum depth to increase the performance.As for the back end, I've an average 0.075ms on my personnal computer, and 0.125ms for the product edition. Since my computer is an old, cheap one (ok not so old), I think your hosting company need to do some shopping Overall performance is a little improved with the 1.1. Link to comment Share on other sites More sharing options...
daYmo Posted November 12, 2008 Share Posted November 12, 2008 I tested the blockcategories module from v1.1 but no visible peformance improvement.Not that much with 150 categories... Link to comment Share on other sites More sharing options...
presta-dyr Posted February 21, 2010 Share Posted February 21, 2010 I know this is an old thread, but it's still relevant. I have a setup with more than 800 categories and sub-categories. The load time was more than 20 seconds on my (slow) server. I discovered that it was blockcategories that used most of the time.The module blockcategories makes heavily use of smarty and recursively includes the tpl tree file. This is a bad idea performance wise.I have rewritten the tree handling so it's done in PHP instead. This improved the performance significantly (less than 0.1 second on my server now).I have attached my module./Kjeld blockcategories.zip 1 Link to comment Share on other sites More sharing options...
SoloKazama Posted February 22, 2010 Share Posted February 22, 2010 presta-dyr - thanx for this!I have another issue and the fix:When u have many categories mixed with products, when u change product category on BO then load time is like 20-30 secs (on tested shop).They fixed it in presta 1.3 and you can use classes/AdminTab.php from 1.3 in version 1.2.5. We tested it, and all works fine. Link to comment Share on other sites More sharing options...
Dahl99 Posted March 8, 2010 Share Posted March 8, 2010 Hi presta-dyr,I used the file you uploaded to help with the shop loading speed but did not notice any difference. If I want to revert back to the original blockcategories can I just delete the folder and replace it with the original?Cheers Link to comment Share on other sites More sharing options...
presta-dyr Posted March 8, 2010 Share Posted March 8, 2010 If you only have a few categories (and sub-categories), you won't notice the difference.Yes, you can just restore the original module./Kjeld Link to comment Share on other sites More sharing options...
Dahl99 Posted March 8, 2010 Share Posted March 8, 2010 Thanks for swift reply. Link to comment Share on other sites More sharing options...
scanreg Posted May 4, 2010 Share Posted May 4, 2010 I know this is an old thread, but it's still relevant. I have a setup with more than 800 categories and sub-categories. The load time was more than 20 seconds on my (slow) server. I discovered that it was blockcategories that used most of the time.The module blockcategories makes heavily use of smarty and recursively includes the tpl tree file. This is a bad idea performance wise.I have rewritten the tree handling so it's done in PHP instead. This improved the performance significantly (less than 0.1 second on my server now).I have attached my module./Kjeld Does this relate to the latest 1.3x versions?Thanks :-) Link to comment Share on other sites More sharing options...
rocky Posted May 5, 2010 Share Posted May 5, 2010 No, the performance of the category module and other areas has been improved in Prestashop v1.3. We'll need to re-evaluate the performance when v1.3 final is released and see what performance issues remain.EDIT: Turns out that the performance of the category module hasn't been improved in PrestaShop v1.3. Link to comment Share on other sites More sharing options...
scanreg Posted May 5, 2010 Share Posted May 5, 2010 Ah, great, thanks so much :-) Link to comment Share on other sites More sharing options...
presta-dyr Posted May 29, 2010 Share Posted May 29, 2010 I just tested version 1.3.0.10 with a large category tree. It looks like nothing has changed (it's very slow). But my module works fine (and fast) with 1.3.0.10./Kjeld Link to comment Share on other sites More sharing options...
deech123 Posted June 4, 2010 Share Posted June 4, 2010 presta-dyr, what is the difference between the original and yours?In the backoffice I see no more other options...or did you use different code? Link to comment Share on other sites More sharing options...
presta-dyr Posted June 4, 2010 Share Posted June 4, 2010 It is only a performance improvement. I went from 20 s til 0.1 s load time in an example with 800 categories and sub-categories./Kjeld Link to comment Share on other sites More sharing options...
deech123 Posted June 4, 2010 Share Posted June 4, 2010 presta-dyr,I did the test with your module.I have over 1200 categories.well before (with the original module) I had over 32 seconds to load a page.now I have it done in max 1 second.wonderfullI will test furtherthx Link to comment Share on other sites More sharing options...
Vaidas Posted June 9, 2010 Share Posted June 9, 2010 Hi, i testesd this modul, but nothing changed. My test shop url http://www.7parts.lt/PrestaShop . There is over 20.000 categories,subcategories and subsubcategories, but there is now products. Is there any solution to make shop faster? Now the loading time is about 27 secondsSorry for my englishthank's Link to comment Share on other sites More sharing options...
rocky Posted June 9, 2010 Share Posted June 9, 2010 I've got a performance tips page on my website that may help you increase the speed of your website. Link to comment Share on other sites More sharing options...
presta-dyr Posted June 9, 2010 Share Posted June 9, 2010 Try to disable blockcategories and see if indeed this is the one eating your performance./Kjeld Link to comment Share on other sites More sharing options...
Vaidas Posted June 9, 2010 Share Posted June 9, 2010 When i disable blockategories it works ok. my shop www.7parts.lt with less categories works i think ok, but test shop www.7parts.lt/PrestaShop with 20.000 categories is very slow Link to comment Share on other sites More sharing options...
presta-dyr Posted June 9, 2010 Share Posted June 9, 2010 I tried fetching your page with cURL. It takes 6 s to get it (still very long time). So if it takes 27 s for you to get the page it is probably the rendering in your browser that takes a lot of time./Kjeld Link to comment Share on other sites More sharing options...
Vaidas Posted June 9, 2010 Share Posted June 9, 2010 When i import firs and second csv file with categories and subcategories (about 2000) it works ok, but when i import the third csv file with subsubcategories, the shop is very slow. Now i tryed to import subsubcategories in www.7parts.lt and get error :Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.I call to my hosting administrator and he said that the probably the problem is with prestashop. Now there are no products in my shop and it's still slow. Is there any way to make prestashop faster? Now i delet all subsubcategories and shop loads in 1,6 seconds. with subsubcategories it loads in 14 secons. so the reason is categorie block? any ideas? Link to comment Share on other sites More sharing options...
deech123 Posted June 9, 2010 Share Posted June 9, 2010 take the plugin of rocky.for only 30 $ you have it and all the worries are gone.fast, as much as categories you want....if you look for 5 hours, you lost a lot more. Link to comment Share on other sites More sharing options...
Vaidas Posted June 15, 2010 Share Posted June 15, 2010 Can this module really make shop faster? http://www.blossomcart.com/ use this module and loaiding time of this shop is about 45 seconds. Can somebody explain this? Link to comment Share on other sites More sharing options...
rocky Posted June 15, 2010 Share Posted June 15, 2010 I wonder the same thing. I had a closer look at the site and all the categories are loaded in the top menu and not by AJAX like my category module. Also, the website has lots of modules installed, which may contribute to the slow loading time. I don't think it is my module that is causing the slow loading. Link to comment Share on other sites More sharing options...
Star Posted June 15, 2010 Share Posted June 15, 2010 Can this module really make shop faster? http://www.blossomcart.com/ use this module and loaiding time of this shop is about 45 seconds. Can somebody explain this? The reason my site is slow has nothing to do with Rocky's module. His module is great. When I frist set up my site, I was learning programming. My codes works but were not clean. There were a lot of unneccsiary codes, therefore they slow dowm my site. I am in the middle of upgrading my site to 1.3 as well as cleaning up my codes. Link to comment Share on other sites More sharing options...
schroejahr Posted September 3, 2010 Share Posted September 3, 2010 I know this is an old thread, but it's still relevant. I have a setup with more than 800 categories and sub-categories. The load time was more than 20 seconds on my (slow) server. I discovered that it was blockcategories that used most of the time.The module blockcategories makes heavily use of smarty and recursively includes the tpl tree file. This is a bad idea performance wise.I have rewritten the tree handling so it's done in PHP instead. This improved the performance significantly (less than 0.1 second on my server now).I have attached my module./Kjeld Very NiceI`m using 1.3.1 It took the loading speed from ~6 sec down to 0,5 sec. Link to comment Share on other sites More sharing options...
rushme Posted November 28, 2010 Share Posted November 28, 2010 testing out Kjeld's blockcategories module. I tried replacing the standard 1.3.2 module with this one (deleted original through FTP and replaced with the new one) but now my categories don't show up at all. Do I have to actually uninstall and reinstall the new module for it to work or is just not working for 1.3.2? thanks! Link to comment Share on other sites More sharing options...
klevans Posted January 24, 2011 Share Posted January 24, 2011 Hibit new to here but I have worked on most Open Source carts I have 2k of Cats/subcats and over 40k of products to fit in to cats I have tested a lot and have now moved on to presta to test.this php script will import cats for you, its only quick made and will do one cat level at a time then after first is done you need the ids to link sub cats and so on.Imports a csv file. <?php $hostname='localhost'; $username='USERNAME'; $password='PASWORD'; $database='DB NAME'; $filename='../import/import.csv'; $link = mysql_connect($hostname,$username,$password); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully to server.'; mysql_select_db($database); if(!file_exists($filename)){ die("\n".'file not found\.'); } $handle = fopen($filename, "r"); $row=0; echo "\n"; while (($catagory = fgetcsv($handle, 10000 ,",")) !== FALSE) { print(''); print_r($catagory); print(' '); if(count($catagory)!=3){ echo "\n".'skipping line: '.$catagory; } $now=date("Y-m-d H:i:s"); list($name,$id_parent,$link_rewrite)=$catagory; // Insert category $result = mysql_query( 'INSERT INTO `category`( `id_parent`, `level_depth`, `active`, `date_add`, `date_upd` ) VALUES( '.$id_parent.', 1, 1, \''.$now.'\', \''.$now.'\' ) '); if(!$result) { echo ' '.mysql_error().' '; break; } $thisid = mysql_insert_id(); echo 'Record Inserted: Auto ID is '.$thisid.' '."\n"; // Insert category group $result = mysql_query( 'INSERT INTO `category_group`(`id_category`, `id_group` ) VALUES( '.$thisid.', 1 ) '); if(!$result) { echo ' '.mysql_error().' '; break; if(!mysql_query('DELETE FROM `category` WHERE `id_category` = '.$thisid.' LIMIT 1')) { echo ' Unable to cleanup dirty records: '. mysql_error() .' '; } } //Insert category language $result = mysql_query('INSERT INTO `category_lang`(`id_category`, `id_lang`, `name`, `link_rewrite` ) VALUES( '.$thisid.', 1, \''.htmlspecialchars($name).'\', \''.$link_rewrite.'\' ) '); if(!$result) { echo ' '.mysql_error().' '; break; if(!mysql_query('DELETE FROM `category` WHERE `id_category` = '.$thisid.' LIMIT 1')) { echo ' Unable to cleanup dirty records: '. mysql_error() .' '; } if(!mysql_query('DELETE FROM `category_group` WHERE `id_category` = '.$thisid.' LIMIT 1')) { echo ' Unable to cleanup dirty records: '. mysql_error() .' '; } } } echo ' Import done'; fclose($handle); mysql_close($link); ?> I really don't like all this Charging for simply scripts as the kind people made a free Cart and people try to make money off this and I personal think this is wrong.I will be writing a new script for Product import but I have only just started on the DB.If Presta can not handle all the prods then I will be moving on again. Link to comment Share on other sites More sharing options...
Mattz Posted August 12, 2011 Share Posted August 12, 2011 Kjeld, Is this fix still needed ? I have the same issue with these categories. Thanks! Link to comment Share on other sites More sharing options...
presta-dyr Posted September 8, 2011 Share Posted September 8, 2011 If you're running PS 1.4 there should be no need for the module. I must admit I haven't tested it with the latest 1.3 versions of PS. /Kjeld Link to comment Share on other sites More sharing options...
Recommended Posts