Message box slow for certain users


Home Forums Front End PM PRO Message box slow for certain users

This topic is: Resolved
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #15447
    David
    Participant

    Hi,

    The average speed of my site is around 3-4 seconds for a full page load.

    When I am logged in as Admin the message box opens in around 3 seconds. (Admin has about 500 messages in the message box).

    When I am logged in as User A the message box opens in around 4-5 seconds. (User A has 3 messages in the message box).

    When I am logged in as User B the message box opens in around 7-8 seconds. (User B has 3 messages in the message box).

    User A and User B have the same user role and are identical apart from username.

    The other functions, New Message, Settings, Announcements all load in about 3 seconds for all users.

    These speeds are consistent over about 20+ page loads at various times of the day, server load etc so basically never change for the specific user.

    What can be causing this? Any ideas?

    #15450
    Shamim Hasan
    Keymaster

    This plugin should not have different impact for different user. Can you please install any query monitor plugin so that you can get which query taking more time (if any).

    Let me know.

    #15471
    David
    Participant

    Yes, here is the result for Admin logged in ( I have also attached the full screenshot).

    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
    FROM wp_posts
    LEFT JOIN wp_postmeta
    ON ( wp_posts.ID = wp_postmeta.post_id )
    LEFT JOIN wp_postmeta AS mt1
    ON ( wp_posts.ID = mt1.post_id )
    LEFT JOIN wp_postmeta AS mt2
    ON (wp_posts.ID = mt2.post_id
    AND mt2.meta_key = ‘_fep_delete_by_1’ )
    WHERE 1=1
    AND wp_posts.post_parent = 0
    AND ( wp_postmeta.meta_key = ‘_fep_last_reply_time’
    AND ( ( mt1.meta_key = ‘_fep_participants’
    AND mt1.meta_value = ‘1’ )
    AND mt2.post_id IS NULL ) )
    AND wp_posts.post_type = ‘fep_message’
    AND ((wp_posts.post_status = ‘publish’))
    GROUP BY wp_posts.ID
    ORDER BY wp_postmeta.meta_value+0 DESC
    LIMIT 0, 15

    Attachments:
    You must be logged in to view attached files.
    #15478
    David
    Participant

    And this when I ran it a second time:

    ELECT user_id, meta_key, meta_value
    FROM wp_usermeta
    WHERE user_id IN (253)
    ORDER BY umeta_id ASC

    Caller: update_meta_cache()

    #15485
    Shamim Hasan
    Keymaster

    as you mentioned, your user B taking time more than Admin. Please try to compare admin and B users which query is taking more time for B. Also try to figure out is there any other factor is taking more time for user B than admin.

    Let me know.

    #15488
    David
    Participant

    Here is the screenshot showing the same for the user in question.

    It means nothing to me but I can see that there are 14 queries and it takes 7 seconds which accounts for the delay.

    I have attached the screenshot.

    Attachments:
    You must be logged in to view attached files.
    #15492
    David
    Participant

    Also if I make the slow user an Administrator role or another non-Administrator role it is the same. So it is specific to this user, I suspect there are many other users who have the same problem as the message page loads on average about 50% longer than other pages.

    #15496
    David
    Participant

    I also note that for the slower user, it says plugin is front-end-pm-pro1 and not front-end-pm-pro??

    #15499
    Shamim Hasan
    Keymaster

    is there 2 plugins installed in your website? Please login via ftp/file manager and see in plugins directory if there is any plugin as front-end-pm-pro1. If yes, delete that one and see.

    Let me know.

    #15517
    David
    Participant

    No there is only one. I think the number 1 is referring to the row number which is shown in a separate column on the first attachment in this thread.

    Attachments:
    You must be logged in to view attached files.
    #15521
    Shamim Hasan
    Keymaster

    Please deactivate all plugins except this one and change theme to default theme. Then try. Let me know.
    If still have same problem please give me access to your website so that i can try to find the issue.

    Use https://www.shamimsplugins.com/sensitive-information/
    1. give me admin details which have no issue
    2. give me that user details which have issue
    3. give me ftp so that i can enter some debug code (you can create a ftp account which have only wp-content access)

    #15530
    David
    Participant

    Ok, I have a copy of the website on another server which is not live. I deactivated all plugins and enabled the default theme and it is the same, although a little faster due to having no plugins active. So the Admin message box loads in about 2 seconds and the user message box loads in just under 5 seconds. I have attached the latest query monitor screenshot.

    I assume you can do everything you need to on the test site which is not connected by DNS? I will send the IP address and the FTP account details. There are other live sites on the same server though.

    Attachments:
    You must be logged in to view attached files.
    #15536
    Shamim Hasan
    Keymaster

    If test site have same issue (as you said 2 and 5 seconds) then i can work in that test site.

    Please send all information of that test sites including login url of that test site (not live site).
    I can not access with your provided information. It is showing “ERROR: Wrong login or password” with both of your admin and normal user credential.

    #15538
    David
    Participant

    I sent you the IP address to the server, I can access the test site by changing the Hosts File.

    #15544
    Shamim Hasan
    Keymaster

    Please add following code in your theme’s (child theme’s if any) functions.php

    add_action( 'fep_message_query_args', function( $args ){
    	unset( $args['orderby'], $args['meta_key'] );
    	return $args;
    });
    

    This will order your messages by created date, but query will be lot faster.

    Let me know.

Viewing 15 posts - 1 through 15 (of 23 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.