Skip to content

Conversation

@cursor
Copy link

@cursor cursor bot commented Nov 21, 2025

Cache potatoSentToday and potatoLeftToday results to eliminate redundant SUM queries.

The potatoSentToday and potatoLeftToday methods were repeatedly executing the same database SUM query within a single request, leading to an N+1 query issue, particularly during validation and notification steps. Caching the result after the first execution and updating it when new messages are awarded prevents these unnecessary database calls.


Open in Cursor Open in Web

@cursor
Copy link
Author

cursor bot commented Nov 21, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@codecov
Copy link

codecov bot commented Nov 21, 2025

Bundle Report

Bundle size has no change ✅

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 26.17%. Comparing base (b6005c8) to head (a60e539).

Files with missing lines Patch % Lines
src/Model/Entity/User.php 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #365      +/-   ##
============================================
- Coverage     26.20%   26.17%   -0.04%     
- Complexity      323      327       +4     
============================================
  Files            77       77              
  Lines          3247     3247              
============================================
- Hits            851      850       -1     
- Misses         2396     2397       +1     

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

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