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

Add NullHeap #441

Merged
merged 3 commits into from
Oct 26, 2023
Merged

Add NullHeap #441

merged 3 commits into from
Oct 26, 2023

Conversation

roxblnfk
Copy link
Member

NullHeap is a heap implementation that does nothing.
It is useful when you are using ORM only for reading and you don't need to cache the loaded data.

Effects of using NullHeap:

  • Less memory consumption
  • No need to clean the heap after each request in long-living applications
  • You won't be able to update entities in the database. ORM will consider each loaded entity as newly created.

Fix #419

@butschster butschster requested a review from msmakouz October 25, 2023 13:43
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #441 (5bed70c) into 2.x (35bfbf1) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                2.x     #441      +/-   ##
============================================
+ Coverage     91.60%   91.62%   +0.01%     
- Complexity     1766     1772       +6     
============================================
  Files           112      113       +1     
  Lines          4505     4514       +9     
============================================
+ Hits           4127     4136       +9     
  Misses          378      378              
Files Coverage Δ
src/Heap/NullHeap.php 100.00% <100.00%> (ø)

@roxblnfk roxblnfk merged commit a6463cd into 2.x Oct 26, 2023
29 checks passed
@roxblnfk roxblnfk deleted the null-heap branch October 26, 2023 08:50
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.

💡 Add NullHeap
2 participants