chipset Posted February 13, 2021 Share Posted February 13, 2021 Hello, i install new one PS1.7.7.1 and disable the cache, because the randomly method not worked. If i enable "Randomly display featured products" it work fine with 8 demo products. But when i import lot of products, the home page opening 13-15 seconds! This happens with only 8 number of products to be displayed and about 500 featured (1500 total). If i disable Randomly display, it work fine again (loaded for 1.2s). So, maybe it have some error in the algorithm. In 1.6.2.4 both settings, with the same products, worked without delay. Link to comment Share on other sites More sharing options...
Yelish Posted September 12, 2022 Share Posted September 12, 2022 Maybe it's the php version of your server. What version of php do you use on your server? Link to comment Share on other sites More sharing options...
chipset Posted September 16, 2022 Author Share Posted September 16, 2022 php 7.4 Link to comment Share on other sites More sharing options...
Yelish Posted September 17, 2022 Share Posted September 17, 2022 For some reason the process is slower in prestashop 1.7 but basically the module uses the getProducts function in the category class that makes a mysql query that when random has this code: $sql .= ' ORDER BY RAND() LIMIT ' . (int) $randomNumberProducts; This is a bad option in programming as it slows down the query a lot. Read this post for more information: https://stackoverflow.com/questions/35659076/mysql-query-order-by-rand-very-slow 1 Link to comment Share on other sites More sharing options...
chipset Posted September 19, 2022 Author Share Posted September 19, 2022 Thanks for the advise. I am not sure how to use it for this case, but will try. In PS1.6x it working faster, may i try to combine something. Link to comment Share on other sites More sharing options...
Yelish Posted September 19, 2022 Share Posted September 19, 2022 Good morning here. Prestashop is now a kind of hybrid between the old system and symphony, that means that before what was a simple sql in prestashop 1.6, there are now several classes involved with the consequent slowdown. To give you an example, for your issue I had to trace several classes until I reached the code of the category class. Making a mix between both versions is possible and you would speed up the processes a lot, but you lose the functionality of the new additions to the featured products module. Link to comment Share on other sites More sharing options...
Nickz Posted September 19, 2022 Share Posted September 19, 2022 5 hours ago, chipset said: Thanks for the advise. I am not sure how to use it for this case, but will try. In PS1.6x it working faster, may i try to combine something. Stay with 1.6 or move to thirtybees. (More actual php version) Link to comment Share on other sites More sharing options...
chipset Posted September 20, 2022 Author Share Posted September 20, 2022 16 hours ago, Nickz said: Stay with 1.6 or move to thirtybees. (More actual php version) Heh, i am still on 1.6 and i am happy about this, just want to be "modern". 30B is good alternative, but still no enough templates. Link to comment Share on other sites More sharing options...
Nickz Posted September 20, 2022 Share Posted September 20, 2022 7 hours ago, chipset said: Heh, i am still on 1.6 and i am happy about this, just want to be "modern". 30B is good alternative, but still no enough templates. have you had the time tp compare shops on a mobile device? They all look the same. Its the product which needs to be in the center. Themes you can use from Prestahop, not all though, but there are template makers all over the world. In the end you need to invest in your business and its a tough sale on a cheap server with a free theme plus no IT staff. 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