Skip to content

MC-30776: Improve Performance of SVC #28

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

Merged
merged 2 commits into from
Mar 11, 2020
Merged

MC-30776: Improve Performance of SVC #28

merged 2 commits into from
Mar 11, 2020

Conversation

Rrego6
Copy link
Contributor

@Rrego6 Rrego6 commented Feb 28, 2020

Description (*)

Add performance improvements to SVC during creation of DependencyMap and creation of static analyzers. I also remove the method stmts from the method nodes being stored in the dependency map. This is to fix the memory issues when comparing files.
- Added nikic/php-parser as hard dependency in composer
- Improved performance of DependencyMap creation.
- Remove stms when adding ClassMethod nodes to dependency tree
- Added better doc comments
- Addeed more aggresive AbstractApiVisitor traversal termination
- Refactored code to use switch statements

Fixed Issues (if relevant)

https://jira.corp.magento.com/browse/MC-30776

Manual testing scenarios (*)

Compared results with running original svc branch using 2.3-develop and 2.4-develop.

Both logs are equivalent. The only difference is that this branch adds some "Method implementation changed" PATCH changes. This is explained in AbstractApiVisitor::enterNode comment.

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)

@Rrego6 Rrego6 changed the title Mc 30776 MC-30776: Improve Performance of SVC Mar 2, 2020
@Rrego6 Rrego6 force-pushed the MC-30776 branch 4 times, most recently from d2eb18e to f672d12 Compare March 3, 2020 22:36
@pdohogne-magento pdohogne-magento changed the base branch from master to develop March 4, 2020 18:02
@roribio roribio self-requested a review March 5, 2020 21:49
Copy link
Contributor

@roribio roribio left a comment

Choose a reason for hiding this comment

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

Looks good 💯 Please make a couple of minor changes to avoid merge conflicts.

Thanks!

composer.json Outdated
@@ -1,7 +1,7 @@
{
"name": "magento/magento-semver",
"description": "Magento semantic version checker",
"version": "3.0.0",
"version": "4.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Release 4.0.0 has already gone out. Please bump this to 5.0.0

@@ -10,10 +10,11 @@
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"phpstan/phpdoc-parser": "^0.3.5",
"symfony/console": "~4.4.0",
"symfony/console": "~4.1.0||~4.4.0",
Copy link
Contributor

@roribio roribio Mar 5, 2020

Choose a reason for hiding this comment

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

These changes have gone out as part of v4.0.0. Please rebase your feature branch on develop.

Thanks!

Rrego6 added 2 commits March 5, 2020 17:27
- Added nikic/php-parser as hard dependency in composer
- Improved performance of DependencyMap creation.
- Remove stms when adding ClassMethod nodes to dependency tree
- Added better doc comments
- Addeed more aggresive AbstractApiVisitor traversal termination
- Refactored code to use switch statements
- bump of composer svc version
- regenerated composer.lock with php 7.1
@roribio
Copy link
Contributor

roribio commented Mar 11, 2020

@Rrego6 This is ready to go except the two items I outlined above. Let me know once that's done so I can merge it in.

Thanks!

@Rrego6
Copy link
Contributor Author

Rrego6 commented Mar 11, 2020

https://fisheye.corp.magento.com/cru/CR-MAGETWO-50036
Review after squash (before rebase onto develop)
https://fisheye.corp.magento.com/cru/CR-MAGETWO-49500
Review before squash

@roribio roribio self-requested a review March 11, 2020 19:31
Copy link
Contributor

@roribio roribio left a comment

Choose a reason for hiding this comment

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

Looks good to me 💯 👍

@roribio roribio merged commit 1f37c8b into develop Mar 11, 2020
roribio added a commit that referenced this pull request Mar 12, 2020
* MC-30776:  Improve Performance of SVC (#28)

- Added nikic/php-parser as hard dependency in composer
- Improved performance of DependencyMap creation.
- Remove stms when adding ClassMethod nodes to dependency tree
- Added better doc comments
- Addeed more aggresive AbstractApiVisitor traversal termination
- Refactored code to use switch statements

Co-authored-by: Raoul Rego <[email protected]>
roribio pushed a commit that referenced this pull request Jun 18, 2020
* SVC Release 5.0.0 (#32)

* MC-30776:  Improve Performance of SVC (#28)

- Added nikic/php-parser as hard dependency in composer
- Improved performance of DependencyMap creation.
- Remove stms when adding ClassMethod nodes to dependency tree
- Added better doc comments
- Addeed more aggresive AbstractApiVisitor traversal termination
- Refactored code to use switch statements

Co-authored-by: Raoul Rego <[email protected]>

* MC-33067: Update magento2-infrastructure composer dependencies
- Add PHP 7.4 to composer.json

* Update magento-semver to be compatible with PHP7.4 (#33)

* MC-33156: Update magento-semver to be compatible with PHP7.4
@roribio roribio deleted the MC-30776 branch June 18, 2020 16:14
fascinosum added a commit that referenced this pull request Sep 3, 2021
Has been added compatibility with PHP 8 to `magento/semver`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants