-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Performance improvements in site editor dynamic template names #3404
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 in site editor dynamic template names #3404
Conversation
| 'taxonomy' => $taxonomy, | ||
| 'hide_empty' => false, | ||
| 'name' => $term_title, | ||
| 'update_post_term_cache' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'update_post_term_cache' => false, | |
| 'update_term_meta_cache' => false, |
| 'post_type' => $post_type, | ||
| 'posts_per_page' => 1, | ||
| 'update_post_meta_cache' => false, | ||
| 'update_post_term_cache' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'ignore_sticky_posts' => true,
'no_found_rows' => true,
Should likely add these as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this not need post status?
peterwilsoncc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few notes inline but I am happy to defer to Jonny on this.
| 'hide_empty' => false, | ||
| 'slug' => $slug, | ||
| 'number' => 1, | ||
| 'update_post_term_cache' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'update_post_term_cache' => false, | |
| 'update_term_meta_cache' => false, |
| 'taxonomy' => $taxonomy, | ||
| 'hide_empty' => false, | ||
| 'name' => $term_title, | ||
| 'update_post_term_cache' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have number => 2 as the test is for the existence of duplicates but doesn't indicate how many there are? Is it worth it?
| 'post_type' => $post_type, | ||
| 'post_status' => 'publish', | ||
| 'update_post_meta_cache' => false, | ||
| 'update_post_term_cache' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this have number => 2 as the test is for the existence of duplicates but doesn't indicate how many there are? Is it worth it?
It could probably do with these too:
'ignore_sticky_posts' => true,
'no_found_rows' => true,
|
Closed in favor of #3424 and merged into core in https://core.trac.wordpress.org/changeset/54445. |
Suggestions from @spacedmonkey in WordPress/gutenberg#44645.
Trac ticket: https://core.trac.wordpress.org/ticket/56467