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

Add performance enhancements for WP #104

Closed
2 of 8 tasks
roborourke opened this issue Oct 2, 2019 · 12 comments
Closed
2 of 8 tasks

Add performance enhancements for WP #104

roborourke opened this issue Oct 2, 2019 · 12 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@roborourke
Copy link
Contributor

roborourke commented Oct 2, 2019

Core WP has some performance issues that may only reveal themselves in certain situations. We can start adding some simple mitigations in this module:

ht/ @johnbillion

Acceptance criteria:

@johnbillion
Copy link
Member

Background:

  • Advanced Post Cache caches post queries in regular loops. I've not tested it heavily but it does remove the main post query once the cache is warm.
  • Lightweight Term Count Update removes the slow queries that core performs when recalculating the number of posts assigned to terms after updating a post's terms. On the RS DMS project with ~6M rows in the posts table these queries take 20 full seconds for each taxonomy. Notably, this isn't enabled during cron and CLI requests, which is where we were seeing terrible performance problems recently. We enabled it for cron events according to Allow new counting in CRON Automattic/lightweight-term-count-update#9.

In addition:

@johnbillion
Copy link
Member

VIP has some more performance tweaks here but I've not looked at them in depth: https://github.com/Automattic/vip-go-mu-plugins-built/tree/master/performance

@elodiebouneau elodiebouneau added this to the 4.0 milestone Oct 15, 2019
@dashaluna
Copy link
Contributor

@roborourke could you point where to add comment limitations please?

@johnbillion
Copy link
Member

johnbillion commented Jan 24, 2020

@dashaluna
Copy link
Contributor

dashaluna commented Jan 24, 2020

Both packages mentioned in the description aren't on packagist.

@rmccue is checking if there are forks/substitutes to use instead.

@roborourke
Copy link
Contributor Author

@dashaluna the comment pagination code should go in performance namespace, you should find it under the inc directory

@roborourke
Copy link
Contributor Author

@dashaluna sorry! My fault, the code I was thinking of is in the cloud module. In this case you can add the code to the inc/namespace.php file.

@dashaluna
Copy link
Contributor

@rmccue let me know if there are any updates on those plugins in the description.

@dashaluna
Copy link
Contributor

Waiting to see what to do with both plugins as they are not on packagist.

@roborourke
Copy link
Contributor Author

@dashaluna if you have time and want to come back to this you can create issues on the repos to request that they publish them on packagist. We've done that before.

@dashaluna
Copy link
Contributor

Post cache: Automattic/advanced-post-cache#19
Lightweight term count: Automattic/lightweight-term-count-update#18

@roborourke
Copy link
Contributor Author

Closing out in favour of #207 and #206

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

No branches or pull requests

4 participants