Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DI] fine tune dumped factories#27268

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:di-leaner-dump
May 17, 2018

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

Here is an optimization we forgot in the dumped container: when a private service is referenced once, there is no need to keep it in the internal registry as it will never be reused. This should help a bit the garbage collection process.

sstok reacted with hooray emoji
@ogizanagi
Copy link
Contributor

Can't we merge this in lower branches too?

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedMay 15, 2018
edited
Loading

that's not a bugfix but an improvement, so that's for master

continue;
}
$ids =array();
foreach ($node->getInEdges()as$edge) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd recommend to extract that whole logic into a new private method for clarity.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

done

private$inlineRequires;
private$inlinedRequires =array();
private$circularReferences =array();
private$singlePrivateIds =array();
Copy link
Member

@javiereguiluzjaviereguiluzMay 15, 2018
edited by stof
Loading

Choose a reason for hiding this comment

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

Minor comment. I didn't like the$singlePrivateIds var name, so I looked forEnglish words that mean "used once" and maybe it could be better to rename this to$singleUsePrivateIds

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

updated

return$this->hotPathTag &&$definition->hasTag($this->hotPathTag) && !$definition->isDeprecated();
}

privatefunctionisSingleUsePrivateNode(ServiceReferenceGraphNode$node)
Copy link
Contributor

Choose a reason for hiding this comment

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

bool return declaration?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

not on 3.4

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

but OK on master :)

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit88ecd0d intosymfony:masterMay 17, 2018
fabpot added a commit that referenced this pull requestMay 17, 2018
This PR was merged into the 4.2-dev branch.Discussion----------[DI] fine tune dumped factories| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Here is an optimization we forgot in the dumped container: when a private service is referenced once, there is no need to keep it in the internal registry as it will never be reused. This should help a bit the garbage collection process.Commits-------88ecd0d [DI] fine tune dumped factories
@nicolas-grekasnicolas-grekas deleted the di-leaner-dump branchMay 20, 2018 09:15
@nicolas-grekasnicolas-grekas modified the milestones:next,4.1Nov 1, 2018
This was referencedNov 3, 2018
nicolas-grekas added a commit that referenced this pull requestDec 2, 2018
…services (chalasr)This PR was merged into the 3.4 branch.Discussion----------[DI] Fix dumping expressions accessing single-use private services| Q             | A| ------------- | ---| Branch?       | 4.2| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#29403| License       | MIT| Doc PR        | n/aIntroduced in#27268, see fixed ticketCommits-------d1e84aa [DI] Fix dumping expressions accessing single-use private services
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz left review comments

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

+2 more reviewers

@TobionTobionTobion approved these changes

@ogizanagiogizanagiogizanagi approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

7 participants

@nicolas-grekas@ogizanagi@fabpot@javiereguiluz@stof@Tobion@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp