[Skip to main content](#vessel-content)

#   Hikashop works slow after 4.5.0 update

##

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340186](#340186) by [Bender](/forum/user/38688-bender "View Bender's Profile")  *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340186 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")* was created by *[Bender](/forum/user/38688-bender "View Bender's Profile")*

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.6
-- PHP version -- : 7.4.27
-- Browser(s) name and version -- : chrome

Hi ,
It is seems like Hikashop works slow after 4.5.0 update
the products pages in browser lagging while loading

how to check it ?

We noticed sql query Code:

SELECT product_id as id,product_alias,product_name FROM hikashop_product WHERE product_type = 'main'

while opening pages, where are about 20k products in hikashop_product table

Did you changed any sql code in 4.5.0 update wich may work slow ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340191](#340191) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340191 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

Your pages display fast on my end and we didn't change much with the SQL queries.
Do you still have the problem ? On which pages ?
Where are you located and where is the server located ?
Your website seems to be in Russian. So it's possible that you're just being affected by the restrictions put in place against Russia with what's happening in Ukraine, leading to the loading of the pages being slowed down.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago -  4 years 7 months ago [\#340199](#340199) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340199 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

we are locating in Kazakhstan also as our web server locating

we are observing about 5-10 sec lag while opening any product page
for example any product from this category [ aketo.kz/chastotnye-preobrazovateli/2-2-kvt](https://aketo.kz/chastotnye-preobrazovateli/2-2-kvt)

the restrictions against russians cannot affect cous this different countris

Tellingly, lags are observed specifically when opening web pages with goods. Category pages and other pages seem to load the same as before.

Last edit: 4 years 7 months ago by [Bender](/forum/user/38688-bender "View Bender's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile")
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 747
-
- [](http://www.inphase.one)
-

4 years 7 months ago -  4 years 7 months ago [\#340201](#340201) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340201 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

aketo.kz is hosted on gohost.kz, which has its datacenter in KZ, supposedly, but is a Russian company, has Russian contact numbers, etc.
Depending on where site visitors are, it might well be that traffic is routed through Russia, and that its affected as per Nicolas' indication.

Ping your domain, and/or do a traceroute to see what's happening.
(A traceroute to aketo.kz from where I am actually does include a Russian server with IP 178.210.33.91)

On top of that, it's normal that some web pages take longer to render than others. Your browser's development tools will give you more information on this, plus there are on-line tools which can help you to analyse what's going on.

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Last edit: 4 years 7 months ago by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago -  4 years 7 months ago [\#340202](#340202) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340202 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Thank you, we understand and will check in this direction. Through DevTools, we have already determined that Waiting (TTFB) has increased to 11 seconds on average, this seems to be really a network or server influence than the Hikashop engine

Last edit: 4 years 7 months ago by [Bender](/forum/user/38688-bender "View Bender's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340204](#340204) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340204 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

The network was checked, the traffic goes only through local networks, so that's not the point.

Have you noticed that when loading the product page, php loads all cores at 100%, Is it seems that the new code may eat more resources?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile")
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 747
-
- [](http://www.inphase.one)
-

4 years 7 months ago -  4 years 7 months ago [\#340205](#340205) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340205 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi again,

When loading a product details page (e.g. [ aketo.kz/datchiki/temperatury/termosopro...ct/dts3225-rt1000-v2](https://aketo.kz/datchiki/temperatury/termosoprotivleniya/product/dts3225-rt1000-v2)), basically all of the waiting time is spent with staring at this in the browser window's bottom left corner:
[ ![aketo.jpg](/forum/attachment/54552) ](/forum/attachment/54552 "aketo.jpg")

Apparently, that's for [ mc.yandex.ru/metrika/tag.js](https://mc.yandex.ru/metrika/tag.js) and maybe similar (I haven't checked each and every bit). Just look at such page's waterfall. Again, there are plenty of analytical tools around, you only need to use and read them correctly.

Nothing related to HikaShop. Get rid of the other hold-ups on your site, at least temporarily for testing purposes if other tools don't work for you, and see/verify. If you still need them in the long run, consider loading such time consuming stuff after all other code (= defer respective code lines to the very end of page).

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

- [ ![aketo.jpg](/forum/attachment/54552) ](/forum/attachment/54552 "aketo.jpg") [ ](/forum/attachment/54552?download=1 "aketo.jpg")

Last edit: 4 years 7 months ago by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340207](#340207) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340207 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

While javascript/CSS files being loaded from Russia could indeed be a problem, it's hard to conclude that it is the same for the main HTML page request.
On other pages it loads in a few hundred microseconds, while on the product pages pointed by Bender it takes 7-8 seconds on my end.
So that would indicate something not right on the website/server itself.
To better understand the source of that delay, I would recommend temporarily activating the "debug system" setting of the Joomla configuration. Then, display again the product details page with the issue and look at the debug information at the bottom.
There, you'll see more precisely where the problem is located: MySQL queries, or modules, or others. And if Joomla generates the page in a few hundred microseconds but it takes 7- 8 seconds to get it, then the problem is not on the website but on the server / network.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago -  4 years 7 months ago [\#340218](#340218) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340218 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Nicolas is probably more right indeed.

We enabled Joomla debug console and found what on product pages - aplication AfterRoute use a lot of time and memory - about 6000-11000 ms (an example is here [ drive.google.com/file/d/1WGhFrTqUlfCVWpt...u9\_/view?usp=sharing](https://drive.google.com/file/d/1WGhFrTqUlfCVWptWjb-4F7_waG0Nwu9_/view?usp=sharing))

We didn't made big changes in content on website also as we didn't downgrade of any server's hardware. Website worked fast enought on previous Hikashop's versions with actually same amount of content and hardware. So it seems like the problem may be in onAfterRoute function or something what linked with.

P.S. Component / com_hikashop/router.php may be the reason (step 5 and 6)
like preparing wrong or too much data for onAfterRoute in step 7

see debug [ drive.google.com/file/d/1JDXIBW4dhgVMAdW...N\_Z/view?usp=sharing](https://drive.google.com/file/d/1JDXIBW4dhgVMAdWs1dj11jXYqC1mTN_Z/view?usp=sharing)

Last edit: 4 years 7 months ago by [Bender](/forum/user/38688-bender "View Bender's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340228](#340228) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340228 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

Your first screenshot indeed points at the routing being the culprit. Do you use any SEF extension, like sh404SEF ?

The routing is not only made by that file. Also your screenshot doesn't indicate a problem in that file.
In fact, the only relevant modification made to that file for the 4.5.0 is this:
[ i.imgur.com/6fE3MeR.png](https://i.imgur.com/6fE3MeR.png)
which was made to fix this: [ www.hikashop.com/forum/product-category-...gories.html?start=20](https://www.hikashop.com/forum/product-category-display/903817-problem-with-multilanguage-categories.html?start=20)
And it only affects HikaShop Starter.
I assume you're using the Business edition so it won't change anything for your website.

Normally, in the debug data, you should have timings as well, which would help narrow down the issue:
[ i.imgur.com/5dXTPcZ.png](https://i.imgur.com/5dXTPcZ.png)
But I don't see these on your screenshot. Is it your frontend template removing them ?
It would be great to be able to see these.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340235](#340235) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340235 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

We dont use any SEF extension except embedded in Joomla.
here is zip file with saved debug 2 pages
the first on english and the second on russian =
the lang of website is russian also as all content

also afterroute lag in russian is 6600 ms and on afterroute lag on english is 2200 ms = difference is 4000 ms !
it's bad

[ drive.google.com/file/d/1awC\_KHY234mfg4A...sox/view?usp=sharing](https://drive.google.com/file/d/1awC_KHY234mfg4Al09_99-sbOOb3Msox/view?usp=sharing)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago -  4 years 7 months ago [\#340239](#340239) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340239 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

From what I can see in the query debug data, it comes from a change with made last summer following this thread in order to allow URLs without the id to use translated aliases :
[ www.hikashop.com/forum/5-support-en-fran...ias-de-produits.html](https://www.hikashop.com/forum/5-support-en-francais-french-support-/902985-probleme-avec-la-traduction-des-alias-de-produits.html)
For that to work properly (which wasn't the case until then), we have to load a cache of the all the aliases of all the products. Since you have a lot of products it requires loading a big table of data of 20000 entries in memory and that's what's slowing down the whole thing.

A simple solution to this is to turn off the "Remove products and categories id in URLs" setting in the HikaShop configuration.
That way, the URLs will include the id of the products and the system won't have to search for the matching alias.

For a more complex solution, I've rewritten the code: Code:

function getOriginalId($type, $name, $dynamic=false) { $lang = JFactory::getLanguage(); $tag = $lang-&gt;getTag(); if($this-&gt;falang) { $lang_id = $this-&gt;getId($tag); $condition = 'reference_field='.$this-&gt;database-&gt;Quote($type.'_alias').' AND value = '.$this-&gt;database-&gt;Quote(str_replace(':','-',$name)); if($dynamic) { $name_regex = '^ *p?'.str_replace(array('-',':'),'.+',$name).' *$'; $condition = '((reference_field='.$this-&gt;database-&gt;Quote($type.'_alias').' AND (value = '.$this-&gt;database-&gt;Quote(str_replace(':','-',$name)).' OR value REGEXP '.$this-&gt;database-&gt;Quote($name_regex).')) OR (reference_field='.$this-&gt;database-&gt;Quote($type.'_name').' AND value REGEXP '.$this-&gt;database-&gt;Quote($name_regex).'))'; } $query = 'SELECT reference_id FROM '.hikashop_table('falang_content',false).' WHERE language_id='.(int)$lang_id.' AND reference_table='.$this-&gt;database-&gt;Quote('hikashop_'.$type).' AND '. $condition; $this-&gt;database-&gt;setQuery($query); $retrieved_id = $this-&gt;database-&gt;loadResult(); return $retrieved_id; } static $elements = array(); if(!isset($elements[$type])) { $condition = ''; if($type == 'product') { $condition = ' WHERE product_type = \'main\''; } $query = 'SELECT '.$type.'_id as id,'.$type.'_alias,'.$type.'_name FROM '.hikashop_table($type). $condition; $this-&gt;database-&gt;setQuery($query); $elements[$type] = $this-&gt;database-&gt;loadObjectList('id'); } if(empty($elements[$type])) return false; $class = hikashop_get('class.'.$type); foreach($elements[$type] as $k =&gt; $v) { if(!isset($v-&gt;alias)) { $key = $type.'_id'; $elements[$type][$k]-&gt;$key = $v-&gt;id; $class-&gt;addAlias($elements[$type][$k]); } if($elements[$type][$k]-&gt;alias == str_replace(':','-',$name)) { return $k; } } return false; }

to: Code:

function getOriginalId($type, $name, $dynamic=false, $forceRefresh=false) { $lang = JFactory::getLanguage(); $tag = $lang-&gt;getTag(); if($this-&gt;falang) { $lang_id = $this-&gt;getId($tag); $condition = 'reference_field='.$this-&gt;database-&gt;Quote($type.'_alias').' AND value = '.$this-&gt;database-&gt;Quote(str_replace(':','-',$name)); if($dynamic) { $name_regex = '^ *p?'.str_replace(array('-',':'),'.+',$name).' *$'; $condition = '((reference_field='.$this-&gt;database-&gt;Quote($type.'_alias').' AND (value = '.$this-&gt;database-&gt;Quote(str_replace(':','-',$name)).' OR value REGEXP '.$this-&gt;database-&gt;Quote($name_regex).')) OR (reference_field='.$this-&gt;database-&gt;Quote($type.'_name').' AND value REGEXP '.$this-&gt;database-&gt;Quote($name_regex).'))'; } $query = 'SELECT reference_id FROM '.hikashop_table('falang_content',false).' WHERE language_id='.(int)$lang_id.' AND reference_table='.$this-&gt;database-&gt;Quote('hikashop_'.$type).' AND '. $condition; $this-&gt;database-&gt;setQuery($query); $retrieved_id = $this-&gt;database-&gt;loadResult(); return $retrieved_id; } if(!isset($_SESSION['hikashop_alias_cache'])) $_SESSION['hikashop_alias_cache'] = array(); if(!isset($_SESSION['hikashop_alias_cache'][$type]) &#124;&#124; $forceRefresh) { $condition = ''; if($type == 'product') { $condition = ' WHERE product_type = \'main\''; } $query = 'SELECT '.$type.'_id as id,'.$type.'_alias,'.$type.'_name FROM '.hikashop_table($type). $condition; $this-&gt;database-&gt;setQuery($query); $_SESSION['hikashop_alias_cache'][$type] = $this-&gt;database-&gt;loadObjectList('id'); if(!empty($_SESSION['hikashop_alias_cache'][$type])) { $class = hikashop_get('class.'.$type); foreach($_SESSION['hikashop_alias_cache'][$type] as $k =&gt; $v) { $key = $type.'_id'; $_SESSION['hikashop_alias_cache'][$type][$k]-&gt;$key = $v-&gt;id; $class-&gt;addAlias($_SESSION['hikashop_alias_cache'][$type][$k]); } } } if(empty($_SESSION['hikashop_alias_cache'][$type])) return false; foreach($_SESSION['hikashop_alias_cache'][$type] as $k =&gt; $v) { if($_SESSION['hikashop_alias_cache'][$type][$k]-&gt;alias == str_replace(':','-',$name)) { return $k; } } if(!$forceRefresh) { return $this-&gt;getOriginalId($type, $name, $dynamic, true); } return false; }

in the file administrator/components/com_hikashop/helpers/translation.php
That will move the cache of the aliases in the session instead of in a static variable. That way, the system will only have to load that table of aliases once per user session. So the first product page displayed will be slow, but after that, it should be fast again.
Could you try the modification on your end ? Does it help ?
Unfortunately, I don't see a solution where we wouldn't need to load the aliases table in memory in such cases.

Last edit: 4 years 7 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago -  4 years 7 months ago [\#340253](#340253) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340253 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

The first simple solutin works, but if to use it, then there will be seo problems with search engines,
and we need to configure the web server to redirect, we don't know how to do it right yet.

I'll try second modification and will answer you about it a bit later

Is it possible completely disable the translation function in the router ?
Or to add condition smth like $condition = ' WHERE product_type = \'main\ and product_alias = $variable'';
there $variable is product alias from url ?
Code:

$condition = ' WHERE product_type = \'main\ and product_alias = '\'.(explode(':',$name))[1].''\ ';

on line 148 translation.php v4.5.0 and now it takes more less ms for Application: afterRoute

Last edit: 4 years 7 months ago by [Bender](/forum/user/38688-bender "View Bender's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340255](#340255) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340255 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

Doing that solves your problem since you only load the product if the alias in the hikashop_product table matches with the alias in the URL.
However, this break several things:
- you can't use the product_name as the alias
- you can't use translated aliases anymore as aliases
- you can't use translated product names as aliases either
So basically it breaks more things than it solves.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340285](#340285) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340285 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

I've worked on this a bit more. I've updated the code of the function in [ www.hikashop.com/forum/install-update/90...0-update.html#340239](https://www.hikashop.com/forum/install-update/904132-hikashop-works-slow-after-4-5-0-update.html#340239) so that it works properly.
So if you're testing the changes, make sure you use that new version.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340295](#340295) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340295 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Applayed the code of the new version, it seems to work. We'll test.

Would you make a toogle switcher in Hikashop settings to disable utilize multilang completely?
We're not sure what we're actually using these features:
- you can't use translated aliases anymore as aliases
- you can't use translated product names as aliases either

We gonna upload more products so website's quick response prefferable for us

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340304](#340304) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340304 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

Well, if my modified code solves the problem for you, then I don't see why a toggle would be necessary anymore ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340354](#340354) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340354 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

If to increase the number of sessions and the number of products, the new modified code, still face slow Hikashop and high server loads, also still first interaction of the page problem remains.

Such a switcher will give Hikashop's users (medium and big stores) which are not use the translation of aliases, Falang, etc. more optimization (rendering and router time, cpu time, disk space and so on) .

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

4 years 7 months ago [\#340362](#340362) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340362 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Hi,

Why not. I'll look into it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Bender](/forum/user/38688-bender "View Bender's Profile")**
- [![Bender's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38688-bender "View Bender's Profile") Topic Author
- [ Offline](/forum/user/38688-bender)

Less More

- Posts: 239
- Thank you received: 8
-
-

4 years 7 months ago [\#340400](#340400) by [Bender](/forum/user/38688-bender "View Bender's Profile")  Replied by *[Bender](/forum/user/38688-bender "View Bender's Profile")* on topic *[Hikashop works slow after 4.5.0 update](/forum/25-install-update/904132-hikashop-works-slow-after-4-5-0-update#340400 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.6 -- PHP version -- : 7.4.27 -- Browser(s) name and version -- : chrome  Hi , It is seems like Hikashop works slow after 4.5.0 update the products pages in browser lagging while loading  how to check it ?  We noticed sql query  while opening pages, where are about 20k products in hikashop&#95;product table  Did you changed any sql code in 4.5.0 update wich may work slow ?")*

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzkwNDEzMi1oaWthc2hvcC13b3Jrcy1zbG93LWFmdGVyLTQtNS0wLXVwZGF0ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.228 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
