Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvements #255

Open
polevaultweb opened this issue Nov 23, 2021 · 5 comments
Open

Performance improvements #255

polevaultweb opened this issue Nov 23, 2021 · 5 comments
Assignees

Comments

@polevaultweb
Copy link
Contributor

The loading of the backend and frontend pages should be as fast as possible.

@polevaultweb polevaultweb self-assigned this Nov 23, 2021
@evrpress
Copy link

Not sure if this helps but there's a lot of potential here:

from Query monitor

153 queries on the frontpage. Sure there has to be some but adding would certainly improve things.

@polevaultweb
Copy link
Contributor Author

@evrpress which page was that on?

@evrpress
Copy link

I get this on every page, logged in or not. I temporary use Query Monitor which reports about 50 duplicate queries in my case which mostly look like this:

SELECT meta_key AS key, meta_value AS value
FROM wp_postmeta
WHERE post_id = 444
AND ( meta_key LIKE "_link_roles|%" )
ORDER BY meta_key ASC

or

SELECT meta_key AS key, meta_value AS value
FROM wp_postmeta
WHERE post_id = 65
AND ( meta_key = "_link_visibility"
OR meta_key LIKE "_link_visibility|%" )
ORDER BY meta_key ASC

called by Carbon_Fields\Datastore\Meta_Datastore->get_storage_array()

I've noticed them because they are called twice. On a generic page (like this one) WP user manger does 164 SELECT queries, 153 only from the get_storage_array method.

Let me know if you need anything else

@polevaultweb
Copy link
Contributor Author

If you aren't using WPUM settings on menu items, you should be able to stop those queries with

define( 'WPUM_DISABLE_MENUS_CONTROLLER', true);

@evrpress
Copy link

This basically solved it. I need the functionality though so this is not an option in production. Maybe you can add a caching layer to this until you get #270.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants