Proper Test Cases for Configurable/Simple Products
I've seen a few patches in regards to configurable products closed due to insufficient gains in load time in your unit testing.
You mentioned this setup in testing:
- Magento CE 1.7.0.1 with clear DB
- 2500 configurable products with 2 simple products as options per each configurable product
I assume that is then 5000 individual simple products (2 unique simple products per configurable product)? What were the number of unique super attributes for those simple products? Some of these changes are in large part dependent on the number of super attributes returned. If you only had 2 super attributes defined for those 5000 simple products (black and white) as opposed to multiple thousands (red, pink, cherry, rose, sunset, and on and on.....) these changes pan out quite a bit differently.
See Issue #293 https://github.com/magento/magento2/issues/293
Just as an update on this......
Looking at the 2500 configurable product creation code: https://gist.github.com/mage2-team/4040304
It looks like you are only generating 2 options for your testing, "Option 1" and "Option 2".
Therefore, in things like "function _loadPrices()", this call "$options = $productAttribute->getFrontend()->getSelectOptions();" only ever returns 2 items to loop through with your configurable product tests. I'm not sure what a good average is for options, but I know we currently have 4,500+. Since this is often looped through, that can be quite a difference depending on what happens in the following loop.
I wouldn't suggest just adding in 4,000 options into that script (since it will cause your 5,000 simple products to turn into 10,000,000 simple products) but something should be tweaked with that testing setup as 2 options can't be representative of most installs.
Thank you for proposal. We will get back to you once we have the solution or answer.
Internal reference: MAGETWO-33574
Moving 33574 under performance measurement epic 53797.
@fr0x In our market research we identified the average e-commerce site having 3 product options for configurable & bundled products. We are currently using that when generating test fixtures with the performance tool kit. The epic 53797 is intended to provide more generation control for test fixtures to address # of product options and # of super attributes that manage those permutations.
Now fixture for configurable product support any number of variation, so I close issue