@1jd123
Yes, I agree with your comments.
This backend performance issue is reported here:
https://github.com/ultimatemember/ultimatemember/issues/909
Thread Starter
1jd123
(@1jd123)
But still no solution after 9 Months?
@1jd123
Yes, still no solution by UM development.
I have made a pull request this week for new Hooks in UM so I can release an UM Performance plugin under development. The Plugin is implementing caching for all user status counts.
Thread Starter
1jd123
(@1jd123)
Next update went through but still the same issue. This is ridiculous. Waiting 18 seconds to display the user.php is a way to long.
@1jd123
The performance fix is still under development.
You can read about the remaining issues here:
https://github.com/ultimatemember/ultimatemember/pull/1021
@1jd123
What’s your experience with UM version 2.5.0?
Thread Starter
1jd123
(@1jd123)
Nothing Changed, still loading time of 13 seconds. When i deactivate the Plugin it is <1 second
@1jd123
Thanks for your feedback.
I can immediately see when looking at your 5 second response with the count_users function and this time can be removed by the new caching feature.
https://github.com/ultimatemember/ultimatemember/issues/1080
The two MySQL queries do they have the same SQL statements today?
Thread Starter
1jd123
(@1jd123)
count users still have like 6.83 seconds and the other mysql query:
`SELECT SQL_CALC_FOUND_ROWS gowp_users.ID
FROM gowp_users
LEFT JOIN gowp_usermeta
ON ( gowp_users.ID = gowp_usermeta.user_id
AND gowp_usermeta.meta_key = ‘account_status’ )
WHERE 1=1
AND ( gowp_usermeta.user_id IS NULL )
ORDER BY user_registered desc’ have like 5 seconds.
@1jd123
In the “Query Monitor” plugin what sources do you have in the Caller and Component columns for this SQL statement?
Thread Starter
1jd123
(@1jd123)
count_users from ultimate member <- This takes about 7 seconds
and
WP_User_Query->query() from WordPress core.
@1jd123
Thanks for your reply.
You can try this code snippet together with a change to the UM function call to WP for counting the number of users via UM cache instead of a DB query:
Change line 337 in
/plugins/ultimate-member/includes/core/class-query.php
from
$result = count_users();
to
$result = count_users( 'um_cache' );
Install this code snippet to your active theme’s functions.php file
or use the “Code Snippets” plugin.
add_filter( 'pre_count_users', 'pre_count_users_by_um_caching', 10, 3 );
function pre_count_users_by_um_caching( $null, $strategy, $site_id ) {
if( $strategy != 'um_cache' ) return null;
$result = array();
$result['total_users'] = 0;
$array = array( 'approved',
'rejected',
'awaiting_admin_review',
'awaiting_email_confirmation',
'inactive',
);
foreach( $array as $status ) {
$result['total_users'] += intval( UM()->query()->count_users_by_status( $status ));
}
return $result;
}
-
This reply was modified 3 years, 7 months ago by
missveronica.
Thread Starter
1jd123
(@1jd123)
Changed nothing. I totally do not understand why there is no fix in your plugin? I mean if i deactivate it, my users.php page is loading in like 1 second. Isnt there a possibility to deactivate everything ultimate member is doing on the users.php page?
-
This reply was modified 3 years, 5 months ago by
1jd123.
@1jd123
Can you verify that the second DB Query is gone now with the code snippet above installed?
SELECT SQL_CALC_FOUND_ROWS gowp_users.ID
FROM gowp_users
LEFT JOIN gowp_usermeta ....
The first DB Query is a WP Query and must remain.
Do you have UM User cache enabled?
UM Settings -> Misc -> "Disable Cache User Profile"
Try to disable the UM User cache and display the WP All Users page.
If you get improved response time now you can get a fix to only remove UM backend caching. UM is also caching the WP meta cached content and can rely for the backend on the WP meta cache. This will reduce UM DB queries from about 75 to 34 and now without 20 DB Inserts at my site.