Skip to content

Performance improvements in site editor dynamic template names#3404

Closed
dream-encode wants to merge 1 commit intoWordPress:trunkfrom
dream-encode:trac/54370-performance-follow-up
Closed

Performance improvements in site editor dynamic template names#3404
dream-encode wants to merge 1 commit intoWordPress:trunkfrom
dream-encode:trac/54370-performance-follow-up

Conversation

@dream-encode
Copy link
Copy Markdown
Contributor

'taxonomy' => $taxonomy,
'hide_empty' => false,
'name' => $term_title,
'update_post_term_cache' => false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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,
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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?

@spacedmonkey spacedmonkey requested a review from adamziel October 6, 2022 09:00
Copy link
Copy Markdown
Contributor

@peterwilsoncc peterwilsoncc left a 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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'update_post_term_cache' => false,
'update_term_meta_cache' => false,

'taxonomy' => $taxonomy,
'hide_empty' => false,
'name' => $term_title,
'update_post_term_cache' => false,
Copy link
Copy Markdown
Contributor

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,
Copy link
Copy Markdown
Contributor

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,

@dream-encode
Copy link
Copy Markdown
Contributor Author

Closed in favor of #3424 and merged into core in https://core.trac.wordpress.org/changeset/54445.

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

Successfully merging this pull request may close these issues.

3 participants