BadgeOs slowdown due to linear queries and solution
-
Hi,
Thank you for the plugin with such good features.While developing compatibility with our theme, we found out an issue with BadeOS.
If you have large number of users, the number of queries gets linearly escalated.
The reason is the function
badgeos_register_achievements_list_shortcode
There you are using a call to
get_users()
This causes 1 extra query per user as the users are not cached.
You can change this to
get_users( array( 'fields' => 'all_with_meta' ) )
and WordPress will cache the users before trying to create user object.
This will solve the issue.Hope it helps.
Regards
B
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘BadgeOs slowdown due to linear queries and solution’ is closed to new replies.