Skip to content

24025 add caching for magento product version #24030

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

Conversation

davidverholen
Copy link
Member

fixes #24025

Description (*)

add caching for product version, to not utilize composer runtime on every request to the magento product version.

While this method is called rarely in the core, many 3rd party extensions rely on it to determine the magento version. This leads to many "real" projects having >100ms added to non cached requests

Fixed Issues (if relevant)

  1. Slow Performance of ProductMetadata::getVersion #24025

Manual testing scenarios (*)

  1. have a module installed that relies on the product version to determine e.g. feature compatibility
  2. profile uncached requests

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Aug 6, 2019

Hi @davidverholen. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

Copy link
Contributor

@torhoehn torhoehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidverholen Please fix failing tests. :)

@davidverholen
Copy link
Member Author

@torhoehn do you have an idea why the database compare build fails? Results seem to be all green but still the check is failing

@torhoehn
Copy link
Contributor

torhoehn commented Aug 7, 2019

@davidverholen It's just a problem with the infrastructure. Seems okay for me. :)

@magento-engcom-team
Copy link
Contributor

Hi @torhoehn, thank you for the review.
ENGCOM-5554 has been created to process this Pull Request
✳️ @torhoehn, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@sidolov sidolov requested a review from buskamuza as a code owner September 20, 2019 15:46
@m2-assistant
Copy link

m2-assistant bot commented Sep 26, 2019

Hi @davidverholen, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.4 milestone Sep 26, 2019
@ihor-sviziev ihor-sviziev added Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Dec 13, 2019
@ihor-sviziev
Copy link
Contributor

Test coverage was added in #26001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: App Partner: Brandung partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants