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

Move getMaxmemoryState function call a little bit behind #1329

Closed

Conversation

hwware
Copy link
Member

@hwware hwware commented Nov 20, 2024

In the performEvictions() function, we always need to calculate the memory usage and AOF and replication buffer in the getMaxmemoryState() function, it costs unnecessary function call for zmalloc_used_memory() and freeMemoryGetNotCountedMemory().

Thus, I move the function getMaxmemoryState() call a little behind, it could save energy.

Signed-off-by: hwware <wen.hui.ware@gmail.com>
@hwware hwware force-pushed the move-MAXMEMORY_NO_EVICTION-advanced branch from 6e8236a to 42bb918 Compare November 20, 2024 16:26
@hwware hwware closed this Nov 20, 2024
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.53%. Comparing base (4986310) to head (42bb918).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1329      +/-   ##
============================================
- Coverage     70.68%   70.53%   -0.15%     
============================================
  Files           115      115              
  Lines         63177    63177              
============================================
- Hits          44657    44565      -92     
- Misses        18520    18612      +92     
Files with missing lines Coverage Δ
src/evict.c 97.75% <100.00%> (ø)

... and 11 files with indirect coverage changes

---- 🚨 Try these New Features:

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.

1 participant