yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.9k forks source link

Remove cache \yii\data\ActiveDataProvider::prepareTotalCount() #20206

Closed lav45 closed 5 months ago

lav45 commented 5 months ago
Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️
Fixed issues #20194 #20205
codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.98%. Comparing base (fe5688d) to head (1ff1c65).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #20206 +/- ## ============================================ - Coverage 64.99% 64.98% -0.01% + Complexity 11392 11391 -1 ============================================ Files 430 430 Lines 36925 36922 -3 ============================================ - Hits 23998 23993 -5 - Misses 12927 12929 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

terabytesoftw commented 5 months ago

You can test if this change resolves the yii2-elasticsearch issue.

sleptor commented 4 months ago

@lav45 @samdark Cache removal degraded performance. Now, every page calls count query 4 times! I use kartik gridview

mtangoo commented 4 months ago

Can you test if it is the case with Plain Yii Gridview?

sleptor commented 4 months ago

Tested standard yii\grid\GridView (dev-master). It makes 5 (five) identical count queries during webpage load. Checked from debug panel.

So, the cache definitely does not work, which affects performance notably.

sleptor commented 4 months ago

FYI I described the issue and possible solution here https://github.com/yiisoft/yii2/issues/20213