Closed
Description
Preconditions (*)
Any Magento 2 version.
Steps to reproduce (*)
- Have a more complex composer.json with source checked repositories (git checkouts for example).
- A plugin that calls
ProductMetadata::getVersion
to check for Magento version.
Expected result (*)
Calling ProductMetadata::getVersion, I expected it to be a function returning a constant. Super-fast.
Actual result (*)
147ms in this case with 7 calls to proc_open, calling svn, git, hg to retrieve versions of source packages. In addition the PHP based JSON Parser is triggered for ~15ms. This overhead is present regardless f all packages were dist or source based and their version were known.
This output is from Tideways callgraph profiler:
This is related to the closed #23242 ticket that wasn't reproduced.
This performance issue is especially critical, because they way plugins check the magento version, this overhead is usually present in all requests to a Magento 2 shop.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.3 release lineThe issue has been fixed in 2.4-develop branchGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.3 release