N+1 problem fixed on member filter saving 10 queries a page#4890
N+1 problem fixed on member filter saving 10 queries a page#4890phe-sto wants to merge 11 commits intobuddyboss:releasefrom
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to the BuddyBoss Platform open source project. Please note that this project and all contributions to it are public and bounded by the GPL v2.0 license, and that a record of the contribution (including all personal information you submit with it, including your full name and email address) is maintained indefinitely and may be redistributed with this project. If you are not okay with these terms, please close this pull request. Alternatively, you can let us know about your concerns by adding a comment to this pull request. |
Co-authored-by: Chetan Satasiya <chetansatasiya88@gmail.com>
Co-authored-by: Chetan Satasiya <chetansatasiya88@gmail.com>
Co-authored-by: Chetan Satasiya <chetansatasiya88@gmail.com>
Co-authored-by: Chetan Satasiya <chetansatasiya88@gmail.com>
Co-authored-by: Chetan Satasiya <chetansatasiya88@gmail.com>
|
Hi @chetansatasiya, |
chetansatasiya
left a comment
There was a problem hiding this comment.
@phe-sto Make the code format properly, as it breaking exisitng code format use the WordPress PHPCBF
|
@chetansatasiya I don't get it, what and where is it broken? |
|
I would recommend to run the PHPCS and PHPCBF and it will correct. |
|
@chetansatasiya ok I reformated my code using this: But only kept the lines I changed. |
bp_activity_get_user_mentionname splitedin two as only requires ID and login which are provides in many cases. If present formatting can be called without querying user data in base again.bp_activity_get_user_mentionnamereplaced bybp_activity_format_mentionnameinbp-members-filters.phpsaving my site 10 queries on feed page.I have not check yet if
bp_activity_get_user_mentionnamecould be replace bybp_activity_format_mentionnamein other scripts.