-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issued due too old_fields_map functionality #920
Comments
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
I agree with option 1, remove it completely. |
removing it completely is a serious BC break. (we also do not know, if people did misuse it in some way) We will probably not include it in Version 19. The process for serious BC breaks should in best case go over our RFC process, to give all participating parties enough time to comment on it. solution 3. seams to be a reasonable short term solution which can be accepted in our current version 19. I absolute support Solution 1, but it has to go over the RFC process. |
@Flyingmana Feel free to convert this issue and attached PR as RFC. My objective in next weeks is rather solving issues and perfromance optimizations so I will keep pushing new PR's to the LTS repo. Btw, when I did profiling with all my changes combined, I've got 90% speed improvement in the product sold report on both memory usage and cpu. |
The |
It does seem very unlikely that maintaining support for these few very old field names is very important. I'd like to get rid of this unnecessary complexity in public function getBaseWeeeTaxAppliedRowAmnt()
{
return $this->getData('base_weee_tax_applied_row_amount');
}
public function setBaseWeeeTaxAppliedRowAmnt($value)
{
$this->setData('base_weee_tax_applied_row_amount', $value);
return $this;
} |
I like your Idea @colinmollenhour If we want we could handle deprecations;
|
Deprecation notice in logs is a good idea, what about simply Mage::log('....', Zend_Log:WARN, 'deprecation.log'); |
Also ok |
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
I was wrong about its sole function. Today, I have a use case for |
I think the biggest performance gain comes from avoiding to fetch the fields mapping from configuration on every object creation. |
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: OpenMage#920
The mapping came with Magneto 1.6 to provide a backward compatibility for old (pre 1.6) db field names. Now the mapping is hardcoded in the class instead of saved in the configuration. This improves performance as Magento will not create tons of objects for every new product/order/... entities. Related: #920
Closing since #921 was merged |
Magento 1.6 has introduced a
_initOldFieldsMap
functionality in VarienObject.It was used to keep backward compatibility with code written pre 1.6.
As in 1.6 some db fields names has been changed.
In some models the _initOldFieldsMap returns static array (like in stock), in others like product it gets configuration from xml.
There are 3 solutions:
I would prefer solution 1)
See: https://github.com/lizards-and-pumpkins/magento-connector/issues/143
I've spotted the issue when profiling product sales report.
And saw that on every prodct creation Magento is asking configuration for some node, creating tons of objects which are discarded right after and this triggers PHP garbage collection.
The text was updated successfully, but these errors were encountered: