Skip to content
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
merged 2 commits into from
Mar 19, 2024

Conversation

beberlei
Copy link
Member

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.

@beberlei beberlei requested a review from derrabus March 17, 2024 21:41
@beberlei beberlei marked this pull request as ready for review March 17, 2024 22:08
Copy link
Member

@nicolas-grekas nicolas-grekas left a 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 :)

@beberlei beberlei added this to the 2.19.3 milestone Mar 19, 2024
@derrabus derrabus merged commit 9d1a497 into doctrine:2.19.x Mar 19, 2024
58 checks passed
@derrabus 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
* 2.19.x:
  [Documentation] Removing "Doctrine Mapping Types" ... (#11384)
  [GH-11185] Bugfix: do not use collection batch loading for indexBy assocations. (#11380)
  Improve lazy ghost performance by avoiding self-referencing closure. (#11376)
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
@beberlei beberlei mentioned this pull request May 28, 2024
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