-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve lazy ghost performance by avoiding self-referencing closure #11376
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Nicolas Grekas <[email protected]>
nicolas-grekas
approved these changes
Mar 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing the last miles :)
derrabus
approved these changes
Mar 19, 2024
derrabus
changed the title
Improve lazy ghost performance by avoiding self-referencing closure.
Improve lazy ghost performance by avoiding self-referencing closure
Mar 19, 2024
derrabus
added a commit
that referenced
this pull request
Mar 21, 2024
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Add missing import Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Add missing import Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Add missing import Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Add missing import Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 2.19.x: Set column length explicitly (doctrine#11393) Add missing import Remove unused variable (doctrine#11391) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376)
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 3.1.x: Adjust PHPBench mocks Set column length explicitly (doctrine#11393) Add missing import Remove unused variable (doctrine#11391) Fixed proxy initialization for EnumReflectionProperty Remove older versions from the docs (doctrine#11383) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376) Remove outdated git metadata files (doctrine#11362) Switch join columns around, otherwise index doesnt match Key on fk Fix entities and mapping. Minor code style fix in AbstractRemoteControl Do not schedule batch loading for target classes with composite identifier. Cleanup tests not to use model sets. provides a test case for github issue 11154
derrabus
added a commit
to derrabus/orm
that referenced
this pull request
Mar 21, 2024
* 3.2.x: Adjust PHPBench mocks Set column length explicitly (doctrine#11393) Add missing import Remove unused variable (doctrine#11391) Fixed proxy initialization for EnumReflectionProperty Remove older versions from the docs (doctrine#11383) [Documentation] Removing "Doctrine Mapping Types" ... (doctrine#11384) [doctrineGH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (doctrine#11380) Improve lazy ghost performance by avoiding self-referencing closure. (doctrine#11376) Remove outdated git metadata files (doctrine#11362) Switch join columns around, otherwise index doesnt match Key on fk Fix entities and mapping. Minor code style fix in AbstractRemoteControl Do not schedule batch loading for target classes with composite identifier. Cleanup tests not to use model sets. provides a test case for github issue 11154
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based on @nicolas-grekas work in #11087 (comment)
It refactors the lazy initializer to avoid the self-referencing closure, which caused memory problems and pressure on garbage collection.