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 related issues #21071

Open
2 tasks done
jmlnetwork opened this issue Jan 23, 2024 · 1 comment
Open
2 tasks done

Performance related issues #21071

jmlnetwork opened this issue Jan 23, 2024 · 1 comment

Comments

@jmlnetwork
Copy link

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

I'm monitoring the site with New Relic APM, and I get some signals that some part of the code related to yoast is taking a lot of time.
Here it is:

wp-content/plugins/wordpress-seo/inc/sitemaps/class-sitemaps.php:102,225,261
On these lines, the redirect method is hooked to pre_get_posts and calls build_sitemap, which calls get_sitemap_links. This function takes a lot of time. Could we mitigate this? Maybe don't have this run every time, but only when needed...

Also, on Ajax calls, Yoast calls a validate_addons function, which takes 329ms.
wp-content/plugins/wordpress-seo/inc/class-addon-manager.php::validate_addons: 451, 130
This is hooked to admin_init but shouldn't be needed on front-end Ajax calls. Do you think we could fix this?

To Reproduce

Step-by-step reproduction instructions

These run every time. There are no specific steps you need to follow; you can check an Ajax action profile and a WP Query call.

Expected results

  1. In these situations, the get_sitemap_links method and validate_addons method should not be called.

Actual results

  1. The get_sitemap_links and validate_addons are called and take much server time.
@suascat
Copy link

suascat commented Jan 24, 2024

Please inform the customer of conversation # 1097474 when this conversation has been closed.

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

No branches or pull requests

3 participants