Closed (won't fix)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Product
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Apr 2011 at 11:42 UTC
Updated:
31 May 2011 at 07:50 UTC
Menu rebuilding on a large system is very very very slow... (>20min)
commerce_product_ui_menu generates submenus for every product type
stats on our system
mysql> select count(*) from commerce_product;
+----------+
| count(*) |
+----------+
| 1170177 |
+----------+
1 row in set (0.00 sec)
mysql> select count(*) from commerce_product_type;
+----------+
| count(*) |
+----------+
| 801 |
+----------+
1 row in set (0.00 sec)
mysql>
unusable at all
Comments
Comment #1
podarokComment #2
damien tournoud commentedProduct types are bundles, which means they are part of the entity configuration, which means that they need to stay in limited number. Drupal will load all of them in memory mostly at every page request.
We probably don't actually need to generate the submenu here, but it is probably the least of your concern (even if I don't see the entries added by commerce_product_ui_menu() as explaining why the menu rebuild takes 20 minutes...). I would recommend auditing the memory usage around your site.
Comment #3
andypost@Damien product types is really hard bottleneck because most of computer hardware shops has a lot of types and each of the types has own set of fields and attributes
Field_UI also adds it's own tabs and menu grows tremendously...
Comment #4
podarokwith 800+ product types
with 2000+ fields (common and uniq)
with 1400000+ products
with 800+ uniq views
with 800+ uniq feeds
memory usage not more than 750Mb for php
PS. but I had to make a few patches to commerce_product_ui, commerce_ui, field_ui for disabling redundand menu and tabs generation for UI.
And also using dfw for disabling a few hooks
Comment #5
rszrama commentedWould you care to share the patches? Perhaps there's a way to make the creation of menu items alterable in instances like yours, or maybe we could just release an alternate Product UI module for high performance scenarios. That's why we split the UI modules out from the API modules after all. : )
Comment #6
podarokI think I can... after a fixing other troubles like #1165826: field_info_fields cache workaround fail
Comment #7
damien tournoud commentedYou are trying to bend Drupal 7 out of its design specifications. There is nothing we can do in Drupal Commerce itself.