Pages what require AJAX loads at different speeds

If a user is an Admin the Ajax pages load 2-3 times faster than a non-Admin user.
This applies to all Admin accounts, they are faster than any other user.
It isn’t a logic hook as I don’t have any admin-specific ones.

According to Chrome Network Inspector, this page will load in 2.5 seconds or less. Whereas if I am not an Admin it will load in upwards of 8-22 seconds. This would be on all the same computer/browser/internet connection.

What would be doing this and how can I fix this or even start to investigate this?

I would start by suspecting the database (overgrowth problems).

One of the typical culprits of database slow-downs is security_groups_record. But this check will be quickly bypassed for admins.

Try running the first query in this post

Thank you pgr.

After spending many hours testing I discovered it is favorites that slows things down.

As an Admin I have nothing in my favorites.
As a user, some people have 5 things favorited.

If you have favorites it slows things down significantly.
This seems weird. I have removed favorites for the time being. I have no idea how to fix this or troubleshoot this at the moment.
The issue should be easily replicated.

What is your version of SuiteCRM, and of PHP?

I think that was fixed quite some time ago.

EDIT: see this for some background:

And try this change:

… then tell us how it went.

Thank you pgr. I just removed the ability to add favorites for everyone. As the favorites drop off from the list of Leads and Projects, things will speed up and favorites will be gone. For us it isn’t used enough to put any serious effort into recoding this. Thank you.