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

Use different methods than execute() when retrieving results #2689

Merged
merged 3 commits into from
Sep 4, 2023

Conversation

phansys
Copy link
Collaborator

@phansys phansys commented Sep 3, 2023

This should also contribute reducing the resource consumption where iterators are used instead of arrays.
Calls to compact() were also replaced in order to consume the related variables explicitly.

@phansys phansys force-pushed the iterators branch 2 times, most recently from 762fee8 to 473e11f Compare September 3, 2023 23:06
@codecov
Copy link

codecov bot commented Sep 3, 2023

Codecov Report

Patch coverage: 91.11% and project coverage change: +0.04% 🎉

Comparison is base (a47b675) 79.56% compared to head (2e0ab7a) 79.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2689      +/-   ##
==========================================
+ Coverage   79.56%   79.61%   +0.04%     
==========================================
  Files         161      161              
  Lines        8409     8419      +10     
==========================================
+ Hits         6691     6703      +12     
+ Misses       1718     1716       -2     
Files Changed Coverage Δ
src/Translatable/Mapping/Event/Adapter/ORM.php 89.11% <69.23%> (-1.40%) ⬇️
...atable/Entity/Repository/TranslationRepository.php 84.34% <85.00%> (+3.61%) ⬆️
...able/Document/Repository/TranslationRepository.php 92.30% <90.90%> (-0.08%) ⬇️
...oggable/Document/Repository/LogEntryRepository.php 94.44% <100.00%> (-0.64%) ⬇️
.../Loggable/Entity/Repository/LogEntryRepository.php 96.87% <100.00%> (+0.38%) ⬆️
src/Sluggable/Mapping/Event/Adapter/ODM.php 92.30% <100.00%> (+2.30%) ⬆️
src/Sluggable/Mapping/Event/Adapter/ORM.php 98.41% <100.00%> (-0.05%) ⬇️
src/Translatable/Mapping/Event/Adapter/ODM.php 92.00% <100.00%> (-0.24%) ⬇️
.../MongoDB/Repository/MaterializedPathRepository.php 98.64% <100.00%> (ø)
...c/Tree/Entity/Repository/ClosureTreeRepository.php 51.91% <100.00%> (+0.42%) ⬆️
... and 4 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phansys phansys force-pushed the iterators branch 3 times, most recently from 2fe7a39 to 5bd3cf2 Compare September 3, 2023 23:47
@phansys phansys changed the title Avoid extra checks by replacing execute() calls with getIterator() Use different methods than execute() when retrieving results Sep 3, 2023
@phansys phansys requested a review from franmomu September 3, 2023 23:54
@phansys phansys marked this pull request as ready for review September 3, 2023 23:54
Copy link
Collaborator

@franmomu franmomu left a comment

Choose a reason for hiding this comment

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

👍 not sure if you want to merge this one first or #2686

@phansys
Copy link
Collaborator Author

phansys commented Sep 4, 2023

I guess it would be better to merge #2686 first, just in case.

@franmomu franmomu merged commit e910b4d into doctrine-extensions:main Sep 4, 2023
21 checks passed
@franmomu
Copy link
Collaborator

franmomu commented Sep 4, 2023

thanks @phansys!

@phansys phansys deleted the iterators branch September 4, 2023 12:17
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