KRAPman Posted November 22, 2013 Share Posted November 22, 2013 I get very slow response when deleting (and importing) products on my own server.I am working on new installation of of PrestaShop 1.5.5.0 and I set debugging info: define('_PS_DEBUG_PROFILING_', true); I get debug info as seen from the attached image ('debug.jpg'). But real time my server spend for deleting 5 products is around 1-2 minutes and I really can't understand where the problem is! The facts regarding my server: - I don't get any severe CPU, memory or HDD utilization when doing "product delete", - mySQL database seems to work fast and fine, i.e. I tested it with manual .php and SELECT/UPDATE statements, - my PrestaShop only got 100 products with just few images and up 1024chars of text per product, - I have full control over my server (win7 x64 & WAMP server), so I also set some other performance variables, like memory_limit, etc. - my server is in TESTING environment, so there is no customers on my site, so this may not be an issue. What else can I check/set to get faster, i.e. "normal" response time? Link to comment Share on other sites More sharing options...
tkjever Posted January 4, 2014 Share Posted January 4, 2014 Same problem! It seems to get slower by the time. Desperately looking for some hints! Version: 1.5.5. Link to comment Share on other sites More sharing options...
tkjever Posted January 4, 2014 Share Posted January 4, 2014 Hi there, found the following solution in the forum. Huge improvement in my case. Please check: http://www.prestashop.com/forums/topic/277897-slow-product-save/?hl=slow&do=findComment&comment=1496556 Link to comment Share on other sites More sharing options...
shopimport.nl Posted January 19, 2014 Share Posted January 19, 2014 I investigated slow detele and the root cause for my environment is InnoDB engine which mysql is using and prestashop is using by default. First I suspected slow queries. There are MANY queries when you delete one product. And also to correct the position I see hundreds or more of these taking all long time (first value in seconds) 0.4297:UPDATE `ps_category_product` SET `position` = '0' WHERE `id_category` = 107 AND `id_product` = 1328 ====== 0.1726:UPDATE `ps_category_product` SET `position` = '1' WHERE `id_category` = 107 AND `id_product` = 1346 ====== 0.0882:UPDATE `ps_category_product` SET `position` = '2' WHERE `id_category` = 107 AND `id_product` = 1348 ====== 0.4659:UPDATE `ps_category_product` SET `position` = '3' WHERE `id_category` = 107 AND `id_product` = 1376 Then I dig into the code and see this comment: // Deleting products can be quite long on a cheap server. Let's say 1.5 seconds by product (I've seen it!). I can tell you I don't have a cheap server... Then I discovered that mysql is very slow for delete/update/insert when using InnoDB. I changed all tables to MyISAM and voila, no more LONGGGG delays. Maybe even 100 times faster!! How I did: Export your full database to an sql file (I use mysqldump, but can also be myphpadmin). Then first make a copy of the file (so you have a backup). Then replace "InnoDB" with "MyISAM" and import again. Also my shop is faster again for normal usage (select). Maybe because I optimized the mysql server. 2 Link to comment Share on other sites More sharing options...
afxgroup Posted March 5, 2014 Share Posted March 5, 2014 The only solution for my HUGE database is to override cleanPositions class Product extends ProductCore { public static function cleanPositions($id_category) { LibTools::log_import("cleanPositions\n"); //do nothing.. sad to say.. } } Link to comment Share on other sites More sharing options...
Nabbolo Posted July 18, 2014 Share Posted July 18, 2014 (edited) Have this problem, it takes like a minute per product or even more to delete it. My server configuration is alright and i have almost no reachable limits on memory usage, timeout, etc... also, I didn't change anything from original core files (using PS 1.6.0.6). Import CSV is also slower than what it should be, but ways quicker than deleting. I would like to solve without tricks, in a clean way. Edited July 18, 2014 by Nabbolo (see edit history) Link to comment Share on other sites More sharing options...
AZC Posted April 28, 2015 Share Posted April 28, 2015 Have this problem, it takes like a minute per product or even more to delete it. My server configuration is alright and i have almost no reachable limits on memory usage, timeout, etc... also, I didn't change anything from original core files (using PS 1.6.0.6). Import CSV is also slower than what it should be, but ways quicker than deleting. I would like to solve without tricks, in a clean way. Hi, did you ever solve this issue? Thanks Link to comment Share on other sites More sharing options...
mexis Posted January 25, 2017 Share Posted January 25, 2017 Some news about deleting? Link to comment Share on other sites More sharing options...
Recommended Posts