demographus Developer Frá Romania Meðlimur síðan apr. 2019 demographus 16 des. 2019 10:45 Beyond 500 added Geo Zones to a province, the page [u]/admin/?app=geo_zones&doc=edit_geo_zone&page=1&geo_zone_id=3[/u] started to load slower and slower. After reaching 1300 zones it is loading for more than 30 seconds, therefore it is ending up with an error of exceeded maximum execution time of 30 seconds. LiteCart v.2.2.0, db tables engine is InnoDB.
dodo Moderator Frá Lithuania Meðlimur síðan mar. 2016 dodo 16 des. 2019 14:54 You can simply increase maximum execution time to 300s in php file. set_time_limit(300);
demographus Developer Frá Romania Meðlimur síðan apr. 2019 demographus 16 des. 2019 21:38 I have tried that and for a while it has helped - until I reached 1751 zones for same Geo Zone. After that, no matter how many times I was trying to restart the browser, re-add few more zones, it keeps discarding all but first added zone (as in the screen below), but it's not saving (importing) anything anymore. I guess 1751 is quite a small number and there should me something that keeps too busy the script and db that can be optimized. I have other MySQL DBs with millions of records and complex relationships and CRUD operations are taking few to few hundred miliseconds, not few minutes. Unfortunately, I have not enough time till after New Year to take a look myself and I'm a newbie to LiteCart...
tim Founder Frá Sweden Meðlimur síðan maí 2013 tim 17 des. 2019 00:06 That should not be a heavy operation. Test your server performance with webhosting-performance.com. There is a LiteCart build for download there. Try do it the sql way. See here how all the downloadable geo zones do it in sql. https://www.litecart.net/en/addons?sort=updated&query=geo+zone Example: ``INSERT INTOlc_geo_zones(name,description,date_updated,date_created`) VALUES ('European Union', 'All countries in the European Union', NOW(), NOW()); INSERT INTO lc_zones_to_geo_zones (geo_zone_id, country_code, zone_code, date_updated, date_created) VALUES (LAST_INSERT_ID(), 'AT', '', NOW(), NOW()), (LAST_INSERT_ID(), 'BE', '', NOW(), NOW()), (LAST_INSERT_ID(), 'BG', '', NOW(), NOW()), (LAST_INSERT_ID(), 'CY', '', NOW(), NOW()), (LAST_INSERT_ID(), 'CZ', '', NOW(), NOW()), (LAST_INSERT_ID(), 'DE', '', NOW(), NOW()), (LAST_INSERT_ID(), 'DK', '', NOW(), NOW()), (LAST_INSERT_ID(), 'EE', '', NOW(), NOW()), (LAST_INSERT_ID(), 'ES', '', NOW(), NOW()), (LAST_INSERT_ID(), 'FR', '', NOW(), NOW()), (LAST_INSERT_ID(), 'FI', '', NOW(), NOW()), (LAST_INSERT_ID(), 'GB', '', NOW(), NOW()), (LAST_INSERT_ID(), 'GR', '', NOW(), NOW()), (LAST_INSERT_ID(), 'HR', '', NOW(), NOW()), (LAST_INSERT_ID(), 'HU', '', NOW(), NOW()), (LAST_INSERT_ID(), 'IE', '', NOW(), NOW()), (LAST_INSERT_ID(), 'IT', '', NOW(), NOW()), (LAST_INSERT_ID(), 'LV', '', NOW(), NOW()), (LAST_INSERT_ID(), 'LT', '', NOW(), NOW()), (LAST_INSERT_ID(), 'LU', '', NOW(), NOW()), (LAST_INSERT_ID(), 'MT', '', NOW(), NOW()), (LAST_INSERT_ID(), 'NL', '', NOW(), NOW()), (LAST_INSERT_ID(), 'PL', '', NOW(), NOW()), (LAST_INSERT_ID(), 'PT', '', NOW(), NOW()), (LAST_INSERT_ID(), 'RO', '', NOW(), NOW()), (LAST_INSERT_ID(), 'SE', '', NOW(), NOW()), (LAST_INSERT_ID(), 'SI', '', NOW(), NOW()), (LAST_INSERT_ID(), 'SK', '', NOW(), NOW());```
demographus Developer Frá Romania Meðlimur síðan apr. 2019 demographus 17 des. 2019 23:15 I was able to import the last ~2000 items very fast this way - at 0.015-0.032 sec/50-110 items imported. The speed testing tool you adviced I'll set up in the weekend to have a better image of what's happening. Thank you, Tim!