Fix for Issue #278 (Import -> Stores with large amount of Configurable Products) #284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fix is for Stores with large amounts of Products and Configurable Attributes.
_loadSkuSuperAttributeValues() is given parameters and a foreach loop creates the productIds needed for the current bunch.
The conversion From Sku to Id is duplicated later in save(), but I felt it is best to do the conversion here then let the DB do the work. (Cheap Hash Lookups.)
This fix is based off of a module rewrite for EE 1.12 and has not been tested on Mage2. It should work though, That Module successfully imported 700,000 Simple Products and many (80K~ish) Configurable Products. Most of the Configurable Products having 3 super_attributes.
It has also been tested by @barbazul on CE 1.7.0.2. And it worked.
The changes could be slightly cleaner. To do so I would have to had made a bigger change to the structure of the Module. This version of the fix is conceptually cleaner.
Whatever tests you currently have for testing Import -> Products will work to cover this Fix also.
Signed-off-by: Steven Hoffman [email protected]