Improve performance on comment rendering#12582
Conversation
|
The spell check error has been fixed on #12581. |
…ve-cache-on-comments
|
@alecslupu do you have any way of validating this one? I'm trying to see it through the bullet queries. I don't see much difference in the number of queries. Not only that, but I'm also trying with https://github.com/brunofacca/active-record-query-trace. I don't see much difference between this PR and Do you have any script or screenshot to check out the performance improvement? |
@andreslucena When trying to render the comments list using the develop branch you should see a lot of |
andreslucena
left a comment
There was a problem hiding this comment.
Tried the provided script with the fixes, everything was really fast.
Tried the provided script with develop and I'm still waiting for it to finish 😅
Code-wise is 💯
* use exists? instead of full collection traversal * Add counter cache on cells * replace query with counter cached version
🎩 What? Why?
This PR adds implementation from the comment I have posted here: #12555 (comment)
📌 Related Issues
Link your PR to an issue
Testing
Describe the best way to test or validate your PR.
📷 Screenshots
Please add screenshots of the changes you are proposing
