Skip to content

[DI] fix combinatorial explosion when analyzing the service graph #29369

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 1 commit into from
Nov 28, 2018

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29336
License MIT
Doc PR -

and a few minor things found meanwhile.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Nov 28, 2018
@nicolas-grekas nicolas-grekas merged commit 0d0be12 into symfony:3.4 Nov 28, 2018
nicolas-grekas added a commit that referenced this pull request Nov 28, 2018
…e graph (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix combinatorial explosion when analyzing the service graph

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29336
| License       | MIT
| Doc PR        | -

and a few minor things found meanwhile.

Commits
-------

0d0be12 [DI] fix combinatorial explosion when analyzing the service graph
@nicolas-grekas nicolas-grekas deleted the di-fix branch November 28, 2018 18:31
Copy link
Contributor

@alexander-schranz alexander-schranz left a comment

Choose a reason for hiding this comment

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

@nicolas-grekas thank you! The performance is now again near the 4.1.7 version:

Current benchmark:

v4.1.7: 8,85s user 1,02s system 98% cpu 9,987 total
v4.1.8: 68,62s user 1,42s system 98% cpu 1:05,01 total
v4.1.8 with this patch: 11,52s user 1,29s system 94% cpu 13,576 total

}
}
$this->container->getCompiler()->getServiceReferenceGraph()->clear();
$checkedNodes = array();
Copy link
Contributor

Choose a reason for hiding this comment

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

looks unused? should it be unset($checkedNodes);?

Copy link
Member Author

@nicolas-grekas nicolas-grekas Nov 28, 2018

Choose a reason for hiding this comment

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

could be but that wouldn't provide anything more so not really needed

Copy link
Contributor

@alexander-schranz alexander-schranz Nov 28, 2018

Choose a reason for hiding this comment

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

unset would avoid IDE or code style checker marking it as unused variable so nobody would remove it accidentally ;).

But I'm happy that the container now only take some seconds to build again 😄

@nicolas-grekas
Copy link
Member Author

@alexander-schranz thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants