Hikashop cart = memory hog?

  • Posts: 63
  • Thank you received: 1
  • Hikashop Essential
10 years 11 months ago #172387

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4
-- Browser(s) name and version -- : Firefox

Hello,

Is there any reason why the Hikashop cart module is huge memory hog? (or is something wrong with my configuration?).

As you can tell below, the Hikashop cart module (which is completely empty) requires by far more memory than all the other modules that are loaded on my site:

Joomla! Debug Console

Profile Information
Application 0.000 seconds (0.000); 0.60 MB (0.600) - afterLoad
Application 0.332 seconds (0.332); 8.19 MB (7.595) - afterInitialise
Application 0.525 seconds (0.193); 10.23 MB (2.040) - afterRoute
Application 0.740 seconds (0.215); 14.08 MB (3.849) - beforeRenderModule mod_login (Login Form)
Application 0.776 seconds (0.036); 14.58 MB (0.498) - afterRenderModule mod_login (Login Form)
Application 0.778 seconds (0.002); 14.55 MB (0.000) - afterDispatch
Application 0.813 seconds (0.035); 14.95 MB (0.400) - beforeRenderModule mod_footer (Footer)
Application 0.824 seconds (0.011); 14.96 MB (0.010) - afterRenderModule mod_footer (Footer)
Application 0.824 seconds (0.000); 14.96 MB (0.000) - beforeRenderModule mod_customcss (Custom CSS Global LTR)
Application 0.825 seconds (0.001); 14.97 MB (0.008) - afterRenderModule mod_customcss (Custom CSS Global LTR)
Application 0.825 seconds (0.000); 14.97 MB (0.000) - beforeRenderModule mod_custom (Why Catholics?)
Application 0.833 seconds (0.008); 14.98 MB (0.010) - afterRenderModule mod_custom (Why Catholics?)
Application 0.834 seconds (0.000); 14.98 MB (0.000) - beforeRenderModule mod_custom (Why for Israel?)
Application 0.835 seconds (0.001); 14.98 MB (0.007) - afterRenderModule mod_custom (Why for Israel?)
Application 0.835 seconds (0.000); 14.98 MB (0.000) - beforeRenderModule mod_custom (Learn Hebrew)
Application 0.836 seconds (0.001); 14.99 MB (0.007) - afterRenderModule mod_custom (Learn Hebrew)
Application 0.836 seconds (0.000); 14.99 MB (0.000) - beforeRenderModule mod_kd_facebooklikebox (Facebook LikeBox)
Application 0.838 seconds (0.002); 15.01 MB (0.021) - afterRenderModule mod_kd_facebooklikebox (Facebook LikeBox)
Application 0.838 seconds (0.000); 15.01 MB (0.000) - beforeRenderModule mod_falang (Language Selection)
Application 0.889 seconds (0.051); 15.63 MB (0.624) - afterRenderModule mod_falang (Language Selection)
Application 0.889 seconds (0.000); 15.62 MB (0.000) - beforeRenderModule mod_custom (Follow Us)
Application 0.890 seconds (0.001); 15.63 MB (0.007) - afterRenderModule mod_custom (Follow Us)
Application 0.890 seconds (0.000); 15.63 MB (0.000) - beforeRenderModule mod_custom (Google Search)
Application 0.891 seconds (0.001); 15.63 MB (0.007) - afterRenderModule mod_custom (Google Search)
Application 0.892 seconds (0.000); 15.63 MB (0.000) - beforeRenderModule mod_tags_popular (Popular Tags)
Application 0.927 seconds (0.036); 15.82 MB (0.188) - afterRenderModule mod_tags_popular (Popular Tags)
Application 0.928 seconds (0.001); 15.80 MB (0.000) - beforeRenderModule mod_wdstwitterwidget (Twitter)
Application 1.199 seconds (0.271); 16.19 MB (0.396) - afterRenderModule mod_wdstwitterwidget (Twitter)
Application 1.199 seconds (0.001); 16.18 MB (0.000) - beforeRenderModule mod_ads_elite (Ads-Vertical)
Application 1.217 seconds (0.017); 16.32 MB (0.136) - afterRenderModule mod_ads_elite (Ads-Vertical)
Application 1.217 seconds (0.000); 16.30 MB (0.000) - beforeRenderModule mod_fj_related_plus (Related Articles)
Application 1.230 seconds (0.013); 16.44 MB (0.132) - afterRenderModule mod_fj_related_plus (Related Articles)
Application 1.231 seconds (0.000); 16.42 MB (0.000) - beforeRenderModule mod_hikashop_cart (Your Cart)
Application 1.483 seconds (0.252); 23.05 MB (6.628) - afterRenderModule mod_hikashop_cart (Your Cart)

Application 1.483 seconds (0.001); 23.06 MB (0.006) - beforeRenderModule mod_ads_elite (Ads-Horizontal Narrow Bottom)
Application 1.487 seconds (0.004); 23.05 MB (0.000) - afterRenderModule mod_ads_elite (Ads-Horizontal Narrow Bottom)
Application 1.488 seconds (0.000); 23.03 MB (0.000) - beforeRenderModule mod_custom (Learn Hebrew - Narrow)
Application 1.489 seconds (0.001); 23.04 MB (0.007) - afterRenderModule mod_custom (Learn Hebrew - Narrow)
Application 1.489 seconds (0.000); 23.04 MB (0.004) - beforeRenderModule mod_ads_elite (Ads-Links-Narrow)
Application 1.493 seconds (0.004); 23.06 MB (0.016) - afterRenderModule mod_ads_elite (Ads-Links-Narrow)
Application 1.494 seconds (0.001); 23.07 MB (0.007) - beforeRenderModule mod_aidanews2 (Latest Articles)
Application 1.595 seconds (0.101); 24.01 MB (0.945) - afterRenderModule mod_aidanews2 (Latest Articles)
Application 1.596 seconds (0.002); 23.96 MB (0.000) - beforeRenderModule mod_aidanews2 (Current)
Application 1.635 seconds (0.039); 24.01 MB (0.053) - afterRenderModule mod_aidanews2 (Current)
Application 1.636 seconds (0.001); 23.95 MB (0.000) - beforeRenderModule mod_bt_contentslider (BT Content Slider)
Application 1.833 seconds (0.197); 25.02 MB (1.063) - afterRenderModule mod_bt_contentslider (BT Content Slider)
Application 1.835 seconds (0.002); 24.23 MB (0.000) - beforeRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.856 seconds (0.021); 24.29 MB (0.063) - afterRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.857 seconds (0.001); 24.29 MB (0.000) - beforeRenderModule mod_menu (Top Menu)
Application 2.003 seconds (0.146); 24.54 MB (0.253) - afterRenderModule mod_menu (Top Menu)
Application 2.299 seconds (0.296); 25.26 MB (0.721) - afterRender

Memory Usage
25.24 MB (26,464,488 Bytes)

Thanks for any advice!

Last edit: 10 years 11 months ago by jazzbird.

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #172400

Hi,

The cart module is not just a module.
It requires HikaShop core, so it includes the HikaShop core files in order to work.

When you have some products in the cart, we need the HikaShop core features in order to load the cart content, to display the products with their information, etc.
I understand that it could be strange to load the HikaShop core but the module need to load the cart, so it uses the core functions for that.
The cart module requires the HikaShop helper and the HikaShop cart class to load the Cart (empty or not).
It also requires the translations and the CSS to be displayed correctly.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: jazzbird

Please Log in or Create an account to join the conversation.

  • Posts: 63
  • Thank you received: 1
  • Hikashop Essential
10 years 11 months ago #172457

Ok, good to know, though it is a disappointing that the module is so heavy on resources, even when it is empty (which is most of the time for sites not primarily focused on e-commerce). Is there any way that the cart module could be loaded only when there is something in it?

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #172488

Hi,

I created a task in our TODO list for that.
But I can't give you any schedule or timeline for the implementation.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 63
  • Thank you received: 1
  • Hikashop Essential
10 years 11 months ago #172605

Thanks. I would think this would be a matter of utmost urgency. I have done another test, and now the completely empty module is taking up close to 6.45MB of memory out of a total of 22.19MB for the whole page... this is 29% of the total memory used by the page. This is insane! I am saddened to think that I will might have to look for some other shopping cart solution as long as this persists.

Joomla! Debug Console

Profile Information
Application 0.000 seconds (0.000); 0.60 MB (0.599) - afterLoad
Application 0.333 seconds (0.333); 7.98 MB (7.376) - afterInitialise
Application 0.640 seconds (0.306); 10.02 MB (2.046) - afterRoute
Application 0.742 seconds (0.103); 11.47 MB (1.451) - beforeRenderModule mod_login (Login Form)
Application 0.775 seconds (0.033); 12.14 MB (0.670) - afterRenderModule mod_login (Login Form)
Application 0.781 seconds (0.006); 12.24 MB (0.095) - afterDispatch
Application 0.823 seconds (0.042); 12.64 MB (0.408) - beforeRenderModule mod_customcss (Custom CSS Global LTR)
Application 0.824 seconds (0.001); 12.65 MB (0.008) - afterRenderModule mod_customcss (Custom CSS Global LTR)
Application 0.835 seconds (0.011); 12.66 MB (0.009) - beforeRenderModule mod_hikashop_cart (Your Cart)
Application 1.095 seconds (0.260); 19.11 MB (6.450) - afterRenderModule mod_hikashop_cart (Your Cart)

Application 1.096 seconds (0.001); 19.11 MB (0.000) - beforeRenderModule mod_falang (Language Selection)
Application 1.154 seconds (0.058); 19.74 MB (0.625) - afterRenderModule mod_falang (Language Selection)
Application 1.155 seconds (0.002); 19.73 MB (0.000) - beforeRenderModule mod_tags_popular (Popular Tags)
Application 1.192 seconds (0.036); 19.93 MB (0.194) - afterRenderModule mod_tags_popular (Popular Tags)
Application 1.194 seconds (0.002); 19.92 MB (0.000) - beforeRenderModule mod_ads_elite (Ads-Vertical)
Application 1.214 seconds (0.020); 20.04 MB (0.117) - afterRenderModule mod_ads_elite (Ads-Vertical)
Application 1.214 seconds (0.000); 20.02 MB (0.000) - beforeRenderModule mod_fj_related_plus (Related Articles)
Application 1.232 seconds (0.018); 20.15 MB (0.133) - afterRenderModule mod_fj_related_plus (Related Articles)
Application 1.233 seconds (0.001); 20.15 MB (0.000) - beforeRenderModule mod_ads_elite (Ads-Horizontal Narrow Bottom)
Application 1.237 seconds (0.004); 20.16 MB (0.016) - afterRenderModule mod_ads_elite (Ads-Horizontal Narrow Bottom)
Application 1.238 seconds (0.001); 20.17 MB (0.007) - beforeRenderModule mod_aidanews2 (Latest Articles)
Application 1.344 seconds (0.106); 21.42 MB (1.250) - afterRenderModule mod_aidanews2 (Latest Articles)
Application 1.346 seconds (0.001); 21.37 MB (0.000) - beforeRenderModule mod_aidanews2 (Current)
Application 1.387 seconds (0.041); 21.42 MB (0.053) - afterRenderModule mod_aidanews2 (Current)
Application 1.389 seconds (0.002); 21.37 MB (0.000) - beforeRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.409 seconds (0.020); 21.40 MB (0.027) - afterRenderModule mod_breadcrumbs (Breadcrumbs)
Application 1.694 seconds (0.285); 22.21 MB (0.808) - afterRender

Memory Usage
22.19 MB (23,264,048 Bytes)

Database Queries

HIDDENDEBUG OUTPUT FINISH: -->

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #172636

Hi,

No it's not insane ; it's logical.
See my explanation on post #172400

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 63
  • Thank you received: 1
  • Hikashop Essential
10 years 11 months ago #172702

I see what you have written, and you as developer may have a rationale for the module's behavior. But I hope you see that for a user it makes no sense at all to have an empty module use close to one third of the total memory used by a page. I fail to understand why the module can't be programmed so that it only calls up the HikaShop core features only when there is something in the cart.

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 11 months ago #172704

Hi,

The cart, even if it is empty must load the language (2000 lines), the core, cart class and the configuration settings.
These four elements would use several MB in the memory. If you add the fact that Falang is making a processing of the queries and load his content, it becomes logical that it use 6MB.

Because it these 6MB, there is more than HikaShop, there is also Falang.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum